• Re: RPi & Python 3

    From Daniel Stephens@3:770/3 to All on Tue Feb 7 20:34:01 2023
    Hello and thank you for creating this wonderful BBS!

    I'm in the process of building a front end to a Node.js API for keeping track of all of my ICs and other active electronics. I want to be able to access it from my Amiga 1000, and so I've decided that Mystic BBS is the best option for this. I already use
    Mystic for moving text files back and forth from WP 4.1 on my Amiga to NeoOffice on my Mac and it works great.

    Anyway, I am using the Python3 module 'requests' for handling HTTP requests to the Node.js API on an Ubuntu machine on the interwebs.

    However, simply importing this module into a Mystic Python3 script causes an error to show up in the error.log:
    EAccessViolation Access violation

    I am running Mystic version 1.12 A48
    It's running on a Raspi 4 with the latest Raspbian
    It's running Python 3.9.2

    The python script is simply:
    import mystic_bbs as bbs
    import requests
    bbs.writeln("Hello from Python 3")
    bbs.writeln("We have imported requests module")
    bbs.writeln("|PA")

    The script runs fine until it ends at which point it abruptly ends the connection. It even properly executes the |PA pause; but as soon as a key is pressed the connection terminates.

    If I comment out the "import requests" line, the script runs without terminating the connection and there is no error in the log file.

    Any help would be most appreciated.

    ps: I did do a fresh install of everything and tried with Python 2.7. The same script did not cause the connection to terminate, however it did give me a RunTimeWarning of an API version mismatch for module mystic_bbs.

    Thank you!

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Nicola Mettimano@2:335/601 to Daniel Stephens on Sun Feb 12 23:09:46 2023
    Hello, same problem here with my VM under headless Ubuntu server.
    Here only Py3 ai used but same error, i don't know how to solve, do you have news?

    -------------------------------------------------
    Violence is the last refuge of the incompetent!

    --- Mystic BBS v1.12 A48 (Linux/64)
    * Origin: REtrogaming ACTivities (REACT) BBS (2:335/601)
  • From Daniel Stephens@3:770/3 to Nicola Mettimano on Mon Feb 13 19:18:14 2023
    On Sunday, February 12, 2023 at 5:20:23 PM UTC-5, Nicola Mettimano wrote:
    Hello, same problem here with my VM under headless Ubuntu server.
    Here only Py3 ai used but same error, i don't know how to solve, do you have news?

    No, I’ve not found a solution. I reinstalled everything from the OS up and only installed Python 3.9 and I still get the error: EAccessViolation Access violation

    And while my script runs perfectly, as soon as it ends the telnet session closes,and the error above appears. It’s really quite strange.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Nicola Mettimano@2:335/601 to Daniel Stephens on Tue Feb 14 12:45:45 2023
    No, I’ve not found a solution. I reinstalled everything from the OS up and only installed Python 3.9 and I still get the error:
    EAccessViolation Access violation

    that's what I was about to try...

    And while my script runs perfectly, as soon as it ends the telnet session closes,and the error above appears. It’s really quite strange.

    weird....can't use python with mystic, this is terrible news...

    -------------------------------------------------
    Violence is the last refuge of the incompetent!

    --- Mystic BBS v1.12 A48 (Linux/64)
    * Origin: REtrogaming ACTivities (REACT) BBS (2:335/601)
  • From g00r00@1:129/215 to Daniel Stephens on Tue Feb 14 13:14:57 2023
    Hello, same problem here with my VM under headless Ubuntu server.
    Here only Py3 ai used but same error, i don't know how to solve, do you news?

    No, I’ve not found a solution. I reinstalled everything from the OS up and only installed Python 3.9 and I still get the error:
    EAccessViolation Access violation

    Their problem does not appear to be the same issue, just off the little knowledge I have. Their setup sounds like an environment issue and yours I don't think is.

    Since your script is running and throwing an access issue when closing, its more likely to be a bug. As you may or may not know,
    the current version for 64-bit ARM is the first release of it, so that makes it even more likely to be an issue with Mystic. I can only assume when you say latest Pi OS that means you're using 64-bit OS and Mystic 64-bit for ARM.

    The reason I hadn't responded yet is because I haven't had time to get my 64-bit Pi out to see if I can reproduce the issue on my own.

    ... Read messages, not taglines

    --- Mystic BBS v1.12 A49 2023/01/31 (Windows/64)
    * Origin: Sector 7 * Mystic WHQ (1:129/215)
  • From Travis Mehrer@1:134/303 to Daniel Stephens on Tue Feb 14 15:02:25 2023
    I'm not certain this is related but I've noticed similar issues with Python 3 in Mystic. Particularly when my script is making any sort of external http(s) connection.

    A while back I was writing my own "This Day in History" type script. Everything worked fine until the script finished and then the connection would get dropped from the BBS. In the end it was easier to make cron job that downloaded the history to a file and then open it via open().

    More recently while trying to use feedparser to read RSS I've noticed the same behavior: once the script finished, my session gets disconnected.

    I haven't had time to dig into it more but I suspect if I make a cronjob to save the feed as an XML file and then open() the file and work with it, I suspect it will work. It's not the cleanest way and perhaps not a final solution it's a possible work-around for the time being.

    blade

    ... Error, no Keyboard - Press F1 to Continue.

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