Git Product home page Git Product logo

Comments (5)

bVdCreations avatar bVdCreations commented on May 23, 2024 1

I believe you have install Django on python version 2.7
but you are trying to run the project in python3

from pyscada.

timjbro avatar timjbro commented on May 23, 2024

Thank you. So obvious, can't believe I didn't see it! πŸ€¦β€β™‚οΈ

from pyscada.

paulalting avatar paulalting commented on May 23, 2024

Sorry to open this again, but I have run into the very same issue, with the exact same error.
Running on Debian 9 on a ARM Cubieboard II (A20), I installed as per instructions, initially looking at setup by https://cwraig.id.au/2017/09/17/pyscada-on-raspberry-pi-for-temperature-monitoring-with-ds18b20-on-1-wire-part-1-software-installation/, but noticing some installation steps were missing, like creating database, so reverted to Martin's instructions.

When I head into python (default), the version is 2.7.13, and if I list installed modules via help(modules') I see django as well as numpy and cython and pyModbus. So, it seems things are there.

If I head into python3, ver 3.5.3 and again list installed modules I don't see any of the above.

So, where do I go wrong, if I simply execute the commands as detailed by Martin ?

Martin, this looks like a great project, many thanks for your work.
Looking to set this up to talk to my solar controller over Modbus RTU and generate some better web based GUIs over my existing setup. And if all goes well, for a small industrial application.

Paul Alting (Tasmania, Australia)

from pyscada.

timjbro avatar timjbro commented on May 23, 2024

No worries, I'm glad I'm not the only one. πŸ˜‹

This may not be the best solution, but I didn't want to deal with migrating to python3.
What I did was modify the systemctl service file to force the pyscada service to run in python2.7 instead of the default python3...

sudo systemctl edit --full pyscada

Change the following lines to specify python2.7

ExecStart=/usr/bin/python2.7 /var/www/pyscada/PyScadaServer/manage.py pyscada_daemon start
ExecStop=/usr/bin/python2.7 /var/www/pyscada/PyScadaServer/manage.py pyscada_daemon stop

I don't know if you'll have the same problem, but I also found that the Gunicorn installation directory has changed from /usr/local/bin/gunicorn to /usr/bin/gunicorn.

So I modified the service file for Gunicon too...

sudo systemctl edit --full gunicorn

Hope this helps.
Tim

from pyscada.

paulalting avatar paulalting commented on May 23, 2024

Thanks Tim for your reply. I did just do this some minutes ago and that progresses things along.
Yes, after reading your message about gunicorn, I checked, and yes, it is not in /usr/local/bin, but as you say /usr/bin, so have edited that file also and shut all applications down and do what I don't often do on this board, shutdown and reboot :)
Going to the IP address now brings up a login screen so all good there, except it doesn't appear to accept the username and password I setup for pyscada.

Martin, maybe there are some edits for the installation ?

Thanks again Tim, much appreciate your help.
I guess we can close this issue.

Paul

from pyscada.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.