Jump to content

[Solved] Johnny python3.10: HTTP 500 internal server error occurs


karplus

Recommended Posts

 

Hello, i tried to run a simple test.py as stated on this tutorial https://wiki.helionet.org/tutorials/python and this topic too:

Still i get http 500 error when i open https://karplus.helioho.st/cgi-bin/test.py ; I already checked line endings and they are in unix style; plus i wrote the code by hand directly in online text editor, and also tried copy&paste, but got no luck! Permissions are 755 as suggested by tutorial.

In logs section I always got this error: End of script output before headers: test.py, referer: https://johnny.heliohost.org:8443/ , but I used print("Content-Type: text/html\n\n"), and all the versions of Python supported by Johnny.

Where am I wrong?

Best Regards

Link to comment
Share on other sites

  • 9 months later...

Python versions have changed on the new Johnny. If it was using 3.10 you probably need to update your shebang lines to use 3.12 or 3.9

#!/usr/bin/python3.12 or #!/usr/bin/python3.9

Link to comment
Share on other sites

Hello, i did some tests using my scripts that were fully working before the last july johnny raid crash, and i found that these python modules are now missing:

  • python3.12: pandas, bs4/beautifulsoup4, python-dateutil
  • python3.9: pandas, bs4/beautifulsoup4, requests, pytz

It's possible in the longtime to restore them?

 

Thanks you!

Link to comment
Share on other sites

  • wolstech changed the title to [Krydos] Johnny python3.10: HTTP 500 internal server error occurs
On 8/13/2024 at 5:14 AM, karplus said:

python3.12: pandas, bs4/beautifulsoup4, python-dateutil

Installed. You can see the list of installed modules on Johnny's Python 3.12 and their current versions at https://krydos2.heliohost.org/pyinfo/info3.12.py

On 8/13/2024 at 5:14 AM, karplus said:

python3.9: pandas, bs4/beautifulsoup4, requests, pytz

Installed. You can see the list of installed modules on Johnny's Python 3.9 and their current versions at https://krydos2.heliohost.org/pyinfo/info3.9.py

Link to comment
Share on other sites

  • Krydos changed the title to [Solved] Johnny python3.10: HTTP 500 internal server error occurs

Hello, thanks for everything, I confirm that all required modules get correctly imported now.

 

Now have one last standing error, I report this to you only as a "warning", not a requirement.In the previous johnny installation i used this line of code:

locale.setlocale(category=locale.LC_ALL,locale='it_IT.utf8')

But now it returns this error: File "/usr/lib64/python3.9/locale.py", line 610, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting

Maybe underlying operating system is involved.

Link to comment
Share on other sites

  • Krydos locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...