I've been trying to install an .mpy mod on my bbs. I'm running across a python error that I haven't been able to fix. I'm hoping someone here might be able to lead me in the right direction.
Its intermittent - but I can recreate it on both Linux Raspberry Pi
Mystic systems and Linux x86 Mystic systems. It simply seems like you
have to pick which version to run and only run that... I can get both
py2 and py3 scripts to run fine - so long as I don't use both.
Hopefully this will get ironed out; but as such, these are the woes we live with when running the alpha versions of Mystic. If you want the best functioning software, stick to a47 until the FINAL a48 release - I know that doesn't help you, but... theres no fix ATM.
At my bbS, I've had to revert to only using Python 2 at the moment - g00 doesn't seem to KNOW what the issue is, and... not that he's dancing around it, but it seems like we don't have a current 'fix'.
Thanks for the reply. I've convinced myself that it was something
stupid I did. Sounds as if it may not be. I can quit hitting my head against the wall! Just another lesson in running alpha versions.
I'v edone the same. Honestly I don't know how worhtwhile it would be to really figure out and fix the problem here vs just upgrading all scripts to python 3, but I could be wrong :)
Thanks for the reply. I've convinced myself that it was something stupid I did. Sounds as if it may not be. I can quit hitting my head
against the wall! Just another lesson in running alpha versions.
Lucky that you didn't uninstall ALL python/python3 packages, remove all pip/pip3 packages, compile from source the 2.7 version from the Mystic wiki, have to reinstall all those pip packages and lost 2 weeks - ask me how I know. :P
I'v edone the same. Honestly I don't know how worhtwhile it would be t
really figure out and fix the problem here vs just upgrading all scrip
to python 3, but I could be wrong :)
Yep ; I think thats our salvation, so long as g00 keeps moving to py3..
I just looked into upgrading the script and said sc...it. I'll do with out this one.
What script is it? I'm sure the community could help here - in fact,
maybe theres some good in creating a site, msg base or other thing where we w0rk together to convert py2 scripts to py3.
I'd be willing to help with that both on the code side and putting together what mods/scripts ppl want converted most.
I've been trying to install an .mpy mod on my bbs. I'm running across a python error that I haven't been able to fix. I'm hoping someone here might be able to lead me in the right direction.
Background:
Mystic: v1.12 A48 2022/07/15
Ubuntu: 22.04.1
Python: 2.7.15
After installing the mod per the instructions, I used the GY command to run it from the Main Menu. When I do run it, I get the following error:
PYTHON ERROR (/home/pi/mystic/themes/default/scripts/********.mpy)
File "/home/pi/mystic/themes/default/scripts/********.mpy", line 10, in <module> from bs4 import BeautifulSoup
ImportError: No module named bs4
I've verified that all of the modules are installed as the pip2 install
-r requirements.txt command used verifies this. The Python Demo's
included with Mystic all run with out a problem.
Here's what I've tried:
1. From the Mystic wiki, it talks about issues with stock python versions (especially Ubuntu) having issues with Mystic python. I did try to recompile python per the wiki, but ran into an issue with the libreadline-gplv2-dev library apparently being deprecated and
unavailable. I haven't been able to find any old packages that will install. 2. I verified that the required python modules are installed. Could it be that python can't find them?
I'm hoping someone here can provide some direction or suggestions!
Thanks for taking the time to read this epistle!
ogg
What seems to have worked for me and even a few people I have helped
with this is to copy the compiled libs in to your /mystic directory. Don't forget to change this in the mystic -cfg. Then it starts working.
I made sure to compile both of them and have each one. I used the
newest ones at the time and have zero issues with them.
I also run on Ubuntu so if you would a copy of the already compiled bins let me know
DrClaw
PYTHON ERROR (/home/pi/mystic/themes/default/scripts/********.mpy)
File "/home/pi/mystic/themes/default/scripts/********.mpy", line 10 <module> from bs4 import BeautifulSoup
ImportError: No module named bs4
Hey Ogg, I didn't notice this before - in your instance, it seems likeThat's part of my frustration. When I run those commands, I'm told it's already installed. It's almost if they're installed in some place python can't find them. But thanks for trying! Keep them coming! :)
you don't have beatiful soup installed.
You can do this by typing;
pip install BeautifulSoup
pip3 install BeautifulSoup
(or if I'm wrong...;)
pip install bs4
pip3 install bs4
Another fact. As part of the install, there's a pip2 install -r requirements.txt step that has all of those dependencies in the requirements.txt file. I'll just keep searching for what I'm doing wrong!You can do this by typing;
pip install BeautifulSoup
pip3 install BeautifulSoup
(or if I'm wrong...;)
pip install bs4That's part of my frustration. When I run those commands, I'm told it's already installed. It's almost if they're installed in some place python can't find them. But thanks for trying! Keep them coming! :)
pip3 install bs4
pip install BeautifulSoup
pip3 install BeautifulSoup
That's part of my frustration. When I run those commands, I'm told it's already installed. It's almost if they're installed in some place python can't find them. But thanks for trying! Keep them coming! :)
Under the Unix section, it talks about the issue with Ubuntu. I did try to reinstall python per the directions in it. Everything went fine until installing the "libreadline-gplv2-dev" dependency. No where could I find a package that would install. That's when I gave up on that idea.pip install BeautifulSoup
pip3 install BeautifulSoup
That's part of my frustration. When I run those commands, I'm told it'
already installed. It's almost if they're installed in some place pyth
can't find them. But thanks for trying! Keep them coming! :)
Ok, yer prolly right; I forget how Python and pip are linked, but you prolly just have to add the path where they live to a variable or... somewhere. A couple quick things, Mystic wiki has a nice entry all about python:
http://wiki.mysticbbs.com/doku.php?id=python_install&s[]=python
https://bbs.archlinux.org/viewtopic.php?id=260141 https://linuxhint.com/install_pip_archlinux/
This one is from the search 'python cant find pip installs': https://stackoverflow.com/questions/46575249/python-cant-find-packages-inst
ed-with-pip
Maybe some info is in one of these. With Linux issues, and other OS/software issues, most are already answered if you use Google
enough... :P
I've been trying to install an .mpy mod on my bbs. I'm running across a python error that I haven't been able to fix. I'm hoping someone here might be able to lead me in the right direction.
Background:
Mystic: v1.12 A48 2022/07/15
Ubuntu: 22.04.1
Python: 2.7.15
Not sure if this helps at all, But I just had this problem recently. Unforturnately I use Windows 10 so might not be same problem. Everything was installed properly and I did all the steps it sounds like your
doing. But I had to setup my *Enviroment Variables* in Windows 10 so Python could find bs4, etc..
http://wiki.mysticbbs.com/doku.php?id=python_install&s[]=python
Under the Unix section, it talks about the issue with Ubuntu. I did try to reinstall python per the directions in it. Everything went fine until installing the "libreadline-gplv2-dev" dependency. No where could I
find a package that would install. That's when I gave up on that idea.
Hmmmm - I build that Python 2.7 version, from the Mystic wiki, on Ubuntu 20.04 and Ubuntu 22.10(the newest one... I might be wrong on the .point)I'll give that a shot.
- I don't remember if I had that issue. Search for 'Ubuntu libreadline-gplv2-dev replacement package' or similar, maybe.
Sorry I don't have the answer - but do always remember that the internet usually has answers out there already. Trust me, we all go thru it.We wouldn't be doing this stuff if we didn't like puzzles!
Sorry we don't have an easy gotcha answer concerning this one.
I do think that if you get pip to install BeautifulSoup, that yer script will run. :PThat sounds hopefull!
Here's the output of pip2 install beautifulsoup4:I do think that if you get pip to install BeautifulSoup, that yer scriThat sounds hopefull!
will run. :P
Here's the output of pip2 install beautifulsoup4:I do think that if you get pip to install BeautifulSoup, that yerThat sounds hopefull!
scri
will run. :P
Requirement already satisfied: beautifulsoup4 in /home/pi/.local/lib/python2.7/site-packages (4.9.3)Requirement already satisfied: soupsieve<2.0,>1.2; python_version < "3.0" in /home/pi/.local/lib/python2.7/site-packages (from beautifulsoup4) (1.9.6)Requirement already satisfied: backports.functools-lru-cache; python_version < "3" in /home/pi/.local/lib/python2.7/site-packages (from soupsieve<2.0,>1.2; python_version < "3.0"->beautifulsoup4) (1.6.4)
This is the error I keep getting when I try to install the modules.
They are already installed.
I'm going to try and set the environment varibles for python per
Mystic's wiki and see if that does it.
I'm going to try and set the environment varibles for python per
Mystic's wiki and see if that does it.
https://www.activestate.com/products/python/pip-tools/pip-install-environme
Tried setting the environment variables per the wiki and after
rebooting, had the same issue. I don't think that was it. :(
Tried setting the environment variables per the wiki and after rebooting, had the same issue. I don't think that was it. :(
How are you launching 'mis' ? As root or as a regular user?
Through sudo on startup of pc.
On 14 Sep 2022, esc said the following...
Tried setting the environment variables per the wiki and after rebooting, had the same issue. I don't think that was it. :(
How are you launching 'mis' ? As root or as a regular user?
Through sudo on startup of pc.
ogg
Sysop, Altair IV BBS
Lufkin, TX
Through sudo on startup of pc.
I think this is your problem. Use setcap cap_net_bind or whatever it is
to give the 'mis' binary access to lower ports, and then use your
regular user to launch 'mis' /without/ using sudo.
--- Mystic BBS v1.12 A48 2022/07/11 (Linux/64)
* Origin: m O N T E R E Y b B S . c O M (21:4/173)
pip install BeautifulSoup
pip3 install BeautifulSoup
Try;
pip install beautifulsoup4
---
Best regards,
Christian aka MeaTLoTioN
Originally tried that. What finally fixed the problem I was writing
about wasnot to start 'mis' as root in systemd. I changed the owner in mis.systemd tomy user name and rebooted. Then I did not have the
problem any more.
Thanks for the comment!
Originally tried that. What finally fixed the problem I was writing
about was not to start 'mis' as root in systemd. I changed the owner in mis.systemd to my user name and rebooted. Then I did not have the
problem any more.
Thanks for the comment!
pip install BeautifulSoup
pip3 install BeautifulSoup
Try;
pip install beautifulsoup4
Everything tends to work better if you don't run it as root user. This will take some setup since you have been running it as a root user and will need some permission adjustments as well. If you need assistance
Sysop: | Gary Ailes |
---|---|
Location: | Pittsburgh, PA |
Users: | 132 |
Nodes: | 5 (0 / 5) |
Uptime: | 197:12:23 |
Calls: | 733 |
Files: | 2,171 |
Messages: | 81,894 |