• Mystic Python Issues on Raspberry Pi

    From James Bradley@1:103/705 to All on Sat Dec 3 13:38:09 2022

    My issue.

    How do I write this.....

    SET PYTHONHOME=C:\PYTHON27
    SET PYTHONPATH=C:\PYTHON27\LIB
    SET PATH=%PYTHONHOME%;%PATH%

    ....In Mystic Python for my Raspberry Pi based Mystic BBS?

    A bit of context...

    Just wanted to make this super clear beforehand. I am still very much in the process of learning to code. Which is why I might ask some very basic questions here, sorry!

    I wish to create many Python apps for my Mystic BBS, I can get apps to run, but they all have a mismatch error, on the version I am using, even though I followed the steps to install Mystic so unbelievably close, and, as a result, I am finding it totally impossible to import tweepy and other interesting modules like openpyxl etc...

    In my hours of research, I have found a thread from 2017 on this forum that talks about making symlinks to where the modules are located. But I do not know how to actually write one to the correct location, where to place it in my code or how I would then call or export that module or location.

    This is the page I was attempting to follow but I now find myself utterly stumped at the first hurdle, https://shadowscope.com/bbs-related/how-to-tweet-from-mystic-bbs/

    Any help would be appreciated,

    Thanks Guys!

    @BadAssBradders
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Mike Fenton@1:229/310 to James Bradley on Sun Dec 4 19:31:12 2022
    On 04 Dec 2022, James Bradley said the following...


    Hi Mike,

    Did this and now it says "Cannot initialize Python, press a key".
    Before that the app was running fine apart from the mismatch error, and that no imported modules worked.

    What on earth is going on?

    Check the wiki, it states what you may need to install.

    Sorry, brain hurts after a long day of updating some mods. :)

    ... Message encrypted: Press ALT-F4 to read encoded message

    --- Mystic BBS v1.12 A48 2022/07/15 (Linux/64)
    * Origin: Clutch BBS * telnet://bbs.clutchbbs.com (1:229/310)
  • From James Bradley@1:103/705 to Mike Fenton on Mon Dec 5 04:48:38 2022

    Hey no probs. I have followed the wiki and am getting super stuck. Nothing is working. :(
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Mike Fenton@1:229/310 to James Bradley on Mon Dec 5 09:40:15 2022
    Hey no probs. I have followed the wiki and am getting super stuck.
    Nothing is working. :(

    Have you checked to see if you have the python 2.7 installed by issues the following? If you see no record of this, check by ldconfig -p | grep libpython to see if you see anything that is version 2, not 3.

    ldconfig -p | grep libpython2.7.so.1.0

    If nothing, do an install like the following if using a debian based distro.

    sudo apt-get update
    sudo apt-get install libpython2.7

    ... Light year: 1/3 less calories than your regular year

    --- Mystic BBS v1.12 A48 2022/07/15 (Linux/64)
    * Origin: Clutch BBS * telnet://bbs.clutchbbs.com (1:229/310)
  • From James Bradley@1:103/705 to Mike Fenton on Mon Dec 5 07:55:13 2022

    Yep, I have checked, and it is installed.

    This is why I am so baffled. Somebody else stated that it might be because I am running the server in sudo, but I can't get the ports open unless I do so I haven't got the foggiest!
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Mike Fenton@1:229/310 to James Bradley on Mon Dec 5 12:39:04 2022
    Yep, I have checked, and it is installed.

    This is why I am so baffled. Somebody else stated that it might be
    because I am running the server in sudo, but I can't get the ports open unless I do so I haven't got the foggiest!

    That's fine, run it using sudo. You may need to setup an env variable.

    http://wiki.mysticbbs.com/doku.php?id=python_install#environment_variables

    ... No one knows what's next, but everybody does it.

    --- Mystic BBS v1.12 A48 2022/07/15 (Linux/64)
    * Origin: Clutch BBS * telnet://bbs.clutchbbs.com (1:229/310)
  • From James Bradley@1:103/705 to Mike Fenton on Mon Dec 5 10:44:43 2022

    Yup, I know, I thought it was this, hence my inital question. The wiki is all windows based, so how do I do this in python2.7 for the Raspberry Pi.? There isn't any documentation anywhere that explains how to do this. It just says... "this is how you do it for windows, for the Pi, just work it out!"

    And that's the problem, I can't work it out. I am totally stuck.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Jay Harris@1:229/664.1 to James Bradley on Mon Dec 5 14:20:10 2022
    *** Quoting James Bradley from a message to Mike Fenton ***

    And that's the problem, I can't work it out. I am totally stuck.

    What do you have under ./mystic -cfg -> General Settings and under Python2 Library & Python3 Library:

    https://ibb.co/KhcYbrm

    If there is anything in there, try clearing out the fields and trying again.


    Jay

    ... What kind of exercise do lazy people do? Diddly-squats

    --- Telegard v3.09.g2-sp4/mL
    * Origin: Northern Realms | tg.nrbbs.net | 289-424-5180 (1:229/664.1)
  • From James Bradley@1:103/705 to Jay Harris on Mon Dec 5 11:47:07 2022
    Hi Jay,

    Both fields are empty and have been since the beginning of setting everything up via the Wiki.

    Annoying, right?
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Ryan Fantus@1:218/820 to James Bradley on Mon Dec 5 12:25:18 2022
    This is why I am so baffled. Somebody else stated that it might be
    because I am running the server in sudo, but I can't get the ports open unless I do so I haven't got the foggiest!

    Use setcap to allow the mis binary access to lower ports:

    sudo setcap CAP_NET_BIND_SERVICE=+eip /mystic/mis

    Just make sure you point correctly to mis (in this case, it's in /mystic/mis). Once you've done this, you can run mis directly as the user you intend to use, and it'll be worth a shot to see if it fixes your python issues.

    --- 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 (1:218/820)
  • From Jay Harris@1:229/664.1 to James Bradley on Mon Dec 5 15:36:36 2022
    *** Quoting James Bradley from a message to Jay Harris ***

    Both fields are empty and have been since the beginning of setting everything up via the Wiki.

    Are you using A47 or an A48 pre-alpha?


    Jay

    ... If you don't go to people's funerals, they won't come to yours

    --- Telegard v3.09.g2-sp4/mL
    * Origin: Northern Realms | tg.nrbbs.net | 289-424-5180 (1:229/664.1)
  • From James Bradley@1:103/705 to Ryan Fantus on Mon Dec 5 12:46:20 2022

    Wow, so that approach did open the ports, but there is still a mismatch error and now lots of errors regarding the imported modules.

    I feel like I have two issues here..

    1. Mystic can't work out which Python to use. Or the 2.7 version is incompatible with Mystic, idk
    2. When I install modules, they are going into the wrong place, yet when I open up both Python 2 and 3 IDEs and I type import tweepy or import openpyxl the cursor goes to a new line down indicating that all is installed correctly.

    Urgh.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From James Bradley@1:103/705 to Jay Harris on Mon Dec 5 12:49:03 2022

    Hi Jay, I am using A47 on a Raspberry Pi.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From James Bradley@1:103/705 to Ryan Fantus on Mon Dec 5 14:25:40 2022
    Just make sure you point correctly to mis (in this case, it's in /mystic/mis). Once you've done this, you can run mis directly as the user you intend to use, and it'll be worth a shot to see if it fixes your python issues.


    So I'm running ./mis -server because when I run ./mis I get a screen that shows these commands and the option to "Exit Press Enter". Should I be running Mystic with a different command from the terminal?
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Mike Fenton@1:229/310 to James Bradley on Mon Dec 5 18:22:25 2022
    Yup, I know, I thought it was this, hence my inital question. The wiki
    is all windows based, so how do I do this in python2.7 for the Raspberry Pi.? There isn't any documentation anywhere that explains how to do
    this. It just says... "this is how you do it for windows, for the Pi,
    just work it out!"

    I'd need to get my hands dirty and start doing it myself to figure it out....

    I do have a PI, but I'd have to have time to test and work it out....

    ... Hard work never killed anyone but why take a risk?

    --- Mystic BBS v1.12 A48 2022/07/15 (Linux/64)
    * Origin: Clutch BBS * telnet://bbs.clutchbbs.com (1:229/310)
  • From Jay Harris@1:229/664.1 to James Bradley on Mon Dec 5 20:57:34 2022
    *** Quoting James Bradley from a message to Jay Harris ***

    JB> Hi Jay, I am using A47 on a Raspberry Pi.

    Maybe try this version:

    http://www.mysticbbs.com/downloads/prealpha/mys112a48_p32.zip


    Jay

    ... Why are skeletons so calm? Because nothing gets under their skin

    --- Telegard v3.09.g2-sp4/mL
    * Origin: Northern Realms | tg.nrbbs.net | 289-424-5180 (1:229/664.1)
  • From James Bradley@1:103/705 to Jay Harris on Tue Dec 6 02:02:08 2022

    Upgraded to A48, BBS running smoothly, but still the same issues.

    The Python mismatch error, followed by a long list of importer errors connected to either openpyxl or tweepy.

    This is my screen of errors when trying to import tweepy https://ibb.co/yVpJCxk

    This is my screen of errors when trying to import openpyxl https://ibb.co/bXWhP05

    What's going on?!?!?
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Travis Mehrer@1:134/303 to James Bradley on Mon Dec 5 13:15:30 2022
    because I am running the server in sudo, but I can't get the ports open unless I do so I haven't got the foggiest!

    For the purposes of testing the sudo thing, you could set SSH and telnet to run on higher ports (above 1024 I believe, I like to go above 10000 just to be safe) and that should allow you to run mis server as a regular user.

    This would at least allow you to test the sudo side of things.

    And I suppose you could run ./mystic -l and log in with a local session (with mis server running as a user) to test this as well.

    ... Tech support is just a busy signal away

    --- Mystic BBS v1.12 A48 2022/07/15 (Raspberry Pi/32)
    * Origin: CaNerDUH BBS (1:134/303)