Report this

What is the reason for this report?

i cant get litespeed django venv to wrok .

Posted on May 6, 2019

I am using the Django OpenLiteSpeed One-Click app. I can’t get OpenLiteSpeed beyond the example site.

I get 503 or it just keeps loading. In the log I get: Fatal Python error: Py_Initialize: Unable to get the locale encoding ModuleNotFoundError: No module named ‘encodings’

All I need to do to break it is set the example to use Mysql.

If you change back to sqllite3 it works fine. I know it work because if i use the django test server “python manage.py runserver 0.0.0.0:8000” so the venv is setup correctly.

I have tried adding to the context: PYTHONHOME=/usr/local/lsws/Example/venv/ LS_PYTHONBIN=/usr/local/lsws/Example/venv/bin/python Any Ideas?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

HI

How about keep PYTHONHOME=/usr/local/lsws/Example/venv/ only in the Environment?

Best

Hi,

Yes that was the 1 st thing I did. I just tried again and I get the same result.

Understood, we will try to reproduce it locally first and update you soon.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.