Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Software | Medusa: Not compatible with Python 2 and 3.5 anymore #3991

Closed
aermak opened this issue Dec 22, 2020 · 14 comments
Closed

DietPi-Software | Medusa: Not compatible with Python 2 and 3.5 anymore #3991

aermak opened this issue Dec 22, 2020 · 14 comments
Labels
Solution available 🥂 Definite solution has been done Stretch
Milestone

Comments

@aermak
Copy link

aermak commented Dec 22, 2020

Medusa - after reinstalling can't open start page

Required Information

  • DietPi version | G_DIETPI_VERSION_CORE=6
    G_DIETPI_VERSION_SUB=34
    G_DIETPI_VERSION_RC=3
    G_GITBRANCH='master'
    G_GITOWNER='MichaIng'
  • Distro version | 9.13
  • Kernel version | Linux DietPi 4.19.66-v7+ DietPi-Config | CPU performance benchmark #1253
  • SBC model | RPi 3 Model B (armv7l)

Additional Information (if applicable)

  • Software title | Medusa
  • Was the software title installed freshly or updated/migrated? updated then reinstalled then fresh install
  • Can this issue be replicated on a fresh installation of DietPi? no spare Pi
3b7c015e-f04c-4d56-a63c-3877834ba365
  • Bug report ID | echo $G_HW_UUID

Steps to reproduce

  1. dietpi-software - removed Medusa since service won't start
  2. Reboot
  3. dietpi-software install Medusa 116
  4. Reboot
  5. Go to http://192.168.0.100:8081/ get nothing

Expected behaviour

  • get a login page like before

Actual behaviour

  • Unable to connect - can’t establish a connection to the server at 192.168.0.100:8081
@MichaIng
Copy link
Owner

Many thanks for your report. I'm pasting the service error message you posted at the other issue:

root@DietPi:~# systemctl status medusa.service
● medusa.service - Medusa Daemon
   Loaded: loaded (/etc/systemd/system/medusa.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2020-12-22 15:59:36 CET; 2min 28s ago
  Process: 1662 ExecStart=/usr/bin/python /mnt/dietpi_userdata/medusa/start.py -q --daemon --nolaunch --datadir=/mnt/dietpi_userdata/medusa (code=exited, status=1/FAILURE)

Dec 22 15:59:36 DietPi python[1662]:     from feedparser.api import parse
Dec 22 15:59:36 DietPi python[1662]:   File "/mnt/dietpi_userdata/medusa/ext/feedparser/__init__.py", line 28, in <module>
Dec 22 15:59:36 DietPi python[1662]:     from .api import parse
Dec 22 15:59:36 DietPi python[1662]:   File "/mnt/dietpi_userdata/medusa/ext/feedparser/api.py", line 30, in <module>
Dec 22 15:59:36 DietPi python[1662]:     import urllib.parse
Dec 22 15:59:36 DietPi python[1662]: ImportError: No module named parse
Dec 22 15:59:36 DietPi systemd[1]: medusa.service: Control process exited, code=exited status=1
Dec 22 15:59:36 DietPi systemd[1]: Failed to start Medusa Daemon.
Dec 22 15:59:36 DietPi systemd[1]: medusa.service: Unit entered failed state.
Dec 22 15:59:36 DietPi systemd[1]: medusa.service: Failed with result 'exit-code'.

@MichaIng
Copy link
Owner

I'm afraid Medusa dropped Python 2 support and does not support the old Python 3.5 (min. 3.6) that is shipped with Debian/Raspbian Buster:

You can build Python 3.9 manually and adjust the service file to launch Medusa with the python3 binary, or downgrade to Medusa v0.4.6. But as Stretch will suffer more and more limitations of this kind, I would recommend to upgrade to Raspbian Buster or better flash our newest Raspberry Pi image, if that does not cause too much work during holidays 🙂.

As probably quickest workaround I'll check how to hardcode Medusa v0.4.6 into dietpi-software.

@aermak
Copy link
Author

aermak commented Dec 22, 2020

@MichaIng is there a way to upgrade without flashing the SD card?

@Joulinar
Copy link
Collaborator

Hi,

we are not supporting it officially but you could have a look to following forum post. https://dietpi.com/phpbb/viewtopic.php?p=18988#p18988

However pls do a backup before

@aermak
Copy link
Author

aermak commented Dec 22, 2020

Found some spare microSD cards flashing Buster now and will spend my xmas week setting it up like it was, worst case i go back to the original microSD and live without Medusa till i figure out what to do. One last one, can the backup from Strech be used to restore it back on Buster @MichaIng ? Anyways thanks for the help.

@Joulinar
Copy link
Collaborator

it shouldn't be a problem to clone you current SD card as you have a spare one. Once done just follow the link I posted above for instructions how to update from Stretch to Buster.

@aermak
Copy link
Author

aermak commented Dec 22, 2020

I'm back in business with everything restored. Using Buster and Medusa updated and running. Want to keep this open for the sad souls using Strech @MichaIng ? Otherwise just close it.

@MichaIng
Copy link
Owner

Great to hear.

I'll try to pin an older version for Stretch, probably the internal updater is intelligent enough to know that it must not update, when running under Python 2. Else we need to disable Medusa on Stretch. I'll keep the issue open until this is done.

@MichaIng MichaIng changed the title Medusa - after reinstalling can't open start page DietPi-Software | Medusa: Not compatible with Python 2 and 3.5 anymore Dec 22, 2020
@pedrom34
Copy link

Hey,

I'm sorry, I have the exact same issue.
So, if I read everything correctly, I have to use buster instead of stretch in order for medusa to work again?

And that requires a fresh install. Am I right?

Thanks !

@Joulinar
Copy link
Collaborator

You can have a look to this post #3991 (comment)

@pedrom34
Copy link

OK, I'll do a backup and try.

@Joulinar
Copy link
Collaborator

If possible try to clone your SD card

@pedrom34
Copy link

Well. Medusa works on buster, but I have other issues now 😢
It's not really related to dietpi, but to other programs I installed on my own, so I'll do a fresh install.
Thanks for the tip anyway 😉

@MichaIng MichaIng added Solution available 🥂 Definite solution has been done and removed Investigating 🤔 labels Jan 31, 2021
@MichaIng MichaIng added this to the v6.35 milestone Jan 31, 2021
@MichaIng
Copy link
Owner

I just verified, if fails with Python 3.5 and Python 2 on Debian Stretch, so we need to disable it:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Solution available 🥂 Definite solution has been done Stretch
Projects
None yet
Development

No branches or pull requests

4 participants