iain

I've installed OpenPLC and OpenPLC Editor on a Debian buster VM. I had some warnings (at the foot of this message) with the editor, but they did appear just to be warnings.

I've created the starter project from "Creating your first project" but when I attempt to simulate, I get exceptions:

 

Traceback: <type 'exceptions.AttributeError'>: AttributeError("'NoneType' object has no attribute 'MatchMD5'".)

1. file: /BeremizIDE.py, line: 802, function😮nMenu
2. file: /ProjectController.py, line: 1782, function: _Run
3. file: /ProjectController.py, line: 1949, function:_Transfer

 

The console window text might be relevant:

Successfully built.
Beremiz_service: 1.0
Twisted unavailable.
Pyro port : 61205
Current working directory :/tmp/tmpvUvTy1
PYRO connecting to URI : PYROLOC://127.0.0.1:61205
Connection lost!
PLC did not provide identity and security infomation.
Connection lost!
Latest build does not match with connected target.

but I really don't know where to start. Is "Twisted unavailable." an error? What provides that?


The installation warnings I see is this:

[COMPILING MATIEC]
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/shared/OpenPLC_Editor/matiec/config/missing: Unknown `--is-lightweight' option
Try `/shared/OpenPLC_Editor/matiec/config/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... /bin/mkdir -p

Quote 0 0
thiagoralves
It seems that there might be a package missing on your installation. The missing package usually appears as one of the last lines of the traceback log, however the log you showed is incomplete, so I can’t see which package is missing or where the issue is. Please paste here the entire traceback here
Quote 0 0
iain

That was everything that appeared on the traceback section in the popup. From the bug report file

 

traceback:
File "/shared/OpenPLC_Editor/editor/BeremizIDE.py", line 802, in OnMenu
getattr(self.CTR, method)()
File "/shared/OpenPLC_Editor/editor/ProjectController.py", line 1782, in _Run
if (self._Transfer() is False):
File "/shared/OpenPLC_Editor/editor/ProjectController.py", line 1949, in _Transfer
if self._connector.MatchMD5(MD5):
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'MatchMD5'

wx-platform:
__WXGTK__

wx-version:
3.0.2.0

and I've attached the file. Does this make sense?

Quote 0 0
thiagoralves
Have you tried running the example hello world project from the openplcproject.com website?
Quote 0 0
iain
I hadn't. I just did and got precisely the same exception. Same line numbers etc., same text in the console.
Quote 0 0
thiagoralves
So it seems that something is truly messed up with your setup. Have you tried reinstalling it?
Quote 0 0
thiagoralves
Edit: you only need to reinstall the editor. The runtime has nothing to do with this issue 
Quote 0 0
iain
How would I do that?

Sorry, I had the page open and missed your second message. I'll try reinstalling.
Quote 0 0
thiagoralves
iain wrote:
How would I do that?

https://www.openplcproject.com/plcopen-editor
Quote 0 0
iain
Yeah, sorry about that, I was trying to figure out how to uninstall. Reinstalling's easy 🙂

So no, reinstalling didn't make a difference. I wipe the directory, unzipped it and installed again to force recompile and that didn't change the behaviour either.
Quote 0 0
thiagoralves
That's weird.. I'm revisiting your error messages, it seems that PYRO failed to connect with the simulator runtime. Do you have any kind of firewall blocking ports on your machine?
Quote 0 0
iain
That's one thing I thought to check. No, iptables is empty.

It's pretty much a vanilla Debian machine. The only oddities I can think of are three NICs (on various virtual networks) and the fact that it's a VM. Oh, and I have ipv6 disabled. None of that should affect localhost.
Quote 0 0
thiagoralves
This is very weird. Is this a clean Debian Buster VM? I’ll download buster, put on a VM and try that myself to see check what is going on
Quote 0 0
iain
I'm sorry, with switching to working from home I got dragged away from this for a couple of days. The VM has been through a couple of upgrades. I didn't mean to imply that it's a brand-new clean install, but I don't think there's anything non-standard. TBH I wouldn't care about wiping it and starting over, since there's nothing but basic system (+ Gnome + Xfce) on it. I'll try a clean install.
Quote 0 0
thiagoralves
I just installed Debian Buster + Cinnamon on a blank VM in VMWare (sorry, I didn't see you're using GNOME + Xfce, but it shouldn't matter anyway). I can confirm that the editor is working just fine, including simulations. My VM has only one NIC and it is in bridge mode to access my real network. In any case, I don't see why the NIC card could be causing any issues in your case since all traffic is localhost.

Just as a side note, I installed the latest version from github. I believe that the version on the website is the latest as well, but I'm not sure. To install from git, just run on a terminal:
git clone https://github.com/thiagoralves/OpenPLC_Editor.git
cd OpenPLC_Editor
./install.sh


edit: I just thought it would be useful to provide my console log after a successful simulation
Start build in /home/thiagoralves/Documents/PLC Progs/Test_prog/build
Generating SoftPLC IEC-61131 ST/IL/SFC code...
Compiling IEC Program into C code...
Extracting Located Variables...
C code generated successfully.
PLC :
   [CC]  plc_main.c -> plc_main.o
   [CC]  plc_debugger.c -> plc_debugger.o
py_ext :
   [CC]  py_ext.c -> py_ext.o
PLC :
   [CC]  Config0.c -> Config0.o
   [CC]  Res0.c -> Res0.o
Linking :
   [CC]  plc_main.o plc_debugger.o py_ext.o Config0.o Res0.o -> Test_prog.so
Successfully built.
Beremiz_service:  1.0
Release: 2019-09-20
Twisted unavailable.
Pyro port : 61248
Current working directory :/tmp/tmpmbhlos
PYRO connecting to URI : PYROLOC://127.0.0.1:61248
PLC did not provide identity and security infomation.
Latest build does not match with connected target.
PLC data transfered successfully.
UI thread started successfully.
PLCobject : NewPLC (0cd0dc7f0ddafa2ab027bf5d0e14c8dc)
PLC installed successfully.
PLCobject : PLC started
Starting PLC
PLCobject : PLC stopped
Quote 0 0