jota10
I try to run OpenPLC Editor and I get the following error:

./ openplc_editor.sh                
Traceback (most recent call last):
 File "./editor/Beremiz.py", line 203, in AppStart
   self.BackgroundInitialization()
 File "./editor/Beremiz.py", line 136, in BackgroundInitialization
   self.ImportModules()
 File "./editor/Beremiz.py", line 179, in ImportModules
   mod = __import__(modname)
 File "/home/jose/OpenPLC_Editor/editor/BeremizIDE.py", line 45, in <module>
   from editors.EditorPanel import EditorPanel
 File "/home/jose/OpenPLC_Editor/editor/editors/EditorPanel.py", line 29, in
<module>
   from controls import VariablePanel
 File "/home/jose/OpenPLC_Editor/editor/controls/__init__.py", line 34, in <m
odule>
   from controls.DebugVariablePanel import DebugVariablePanel
 File "/home/jose/OpenPLC_Editor/editor/controls/DebugVariablePanel/__init__.
py", line 26, in <module>
   from controls.DebugVariablePanel.DebugVariablePanel import DebugVariablePa
nel
 File "/home/jose/OpenPLC_Editor/editor/controls/DebugVariablePanel/DebugVari
ablePanel.py", line 29, in <module>
   import numpy
 File "/home/jose/anaconda3/lib/python3.9/site-packages/numpy/__init__.py", l
ine 131
   raise ImportError(msg) from e
                             ^
SyntaxError: invalid syntax

I don't know if it has to do with the versions of numpy or matplotlib or with the version of python
Reply 0 0
thiagoralves
Did you run the ./ install.sh script first? It is possible that some dependencies failed to install as it is trying to run the editor with Python 3 but it needs to be ran on Python 2
Reply 0 0
jota10
Hello. Yes, I have run install.sh. Looking around, I corrected the $PYTHONPATH variable and created an ENV with python2.7 and made some headway, but now it gives me the following error: No module named mpl_toolkits.mplot3d, (Axes3D). So far I haven't found how to fix it. From what I've seen, it's related to matplotlib, but I haven't found anything else.

$ echo $PYTHONPATH
/home/jose/anaconda3/envs/p2/lib/python2.7/site-packages/:/usr/lib/python2.7/d
ist-packages/wx-3.0-gtk3/:/usr/local/lib/python2.7/dist-packages/
(p2) jose@NetBook-LT25:~/OpenPLC_Editor$ ./ openplc_editor.sh  
Traceback (most recent call last):
 File "./editor/Beremiz.py", line 203, in AppStart
   self.BackgroundInitialization()
 File "./editor/Beremiz.py", line 136, in BackgroundInitialization
   self.ImportModules()
 File "./editor/Beremiz.py", line 179, in ImportModules
   mod = __import__(modname)
 File "/home/jose/OpenPLC_Editor/editor/BeremizIDE.py", line 45, in <module>
   from editors.EditorPanel import EditorPanel
 File "/home/jose/OpenPLC_Editor/editor/editors/EditorPanel.py", line 29, in
<module>
   from controls import VariablePanel
 File "/home/jose/OpenPLC_Editor/editor/controls/__init__.py", line 34, in <m
odule>
   from controls.DebugVariablePanel import DebugVariablePanel
 File "/home/jose/OpenPLC_Editor/editor/controls/DebugVariablePanel/__init__.
py", line 26, in <module>
   from controls.DebugVariablePanel.DebugVariablePanel import DebugVariablePa
nel
 File "/home/jose/OpenPLC_Editor/editor/controls/DebugVariablePanel/DebugVari
ablePanel.py", line 47, in <module>
   from controls.DebugVariablePanel.DebugVariableGraphicViewer import *
 File "/home/jose/OpenPLC_Editor/editor/controls/DebugVariablePanel/DebugVari
ableGraphicViewer.py", line 38, in <module>
   from mpl_toolkits.mplot3d import Axes3D
ImportError: No module named mpl_toolkits.mplot3d
Reply 0 0
thiagoralves
Usually the installer will take care of all the required libs. Most likely something happened during installation of some libs and the install failed. Since the editor runs on Python 2.7, there is a specific version of libs that must be installed. Newer versions can be incompatible with 2.7 or with one another.
Reply 0 0
jota10
I saw the versions of the libraries in install.sh. Everything seemed correct. Could you send the requirements.txt to verify?
Reply 0 0
thiagoralves
There is no requirements.txt file on the project. It does the installation via the bash script only. Here is the line that installs all libs:
pip2 install future zeroconf==0.19.1 numpy==1.16.5 matplotlib==2.0.2 lxml pyro sslpsk pyserial

Make sure it is installing on Python2 and not Python3.
Reply 0 0
Reply