DanielH
Dear Thiago:

I'm trying to run PLCOpenEditor on Arch Linux.
I've installed all its dependencies:
python2 2.7.15-1
python2-wxpython3 3.0.2.0-1
python2-pyro 4.72-1
python2-numpy 1.14.5-1
nevow 0.14.3-1 (provides python-nevow)
python2-matplotlib 2.2.2-2
python2-lxml 4.2.1-1

Running PLCOpenEditor.py, it fails with syntax error:

[daniel@hardwork PLCopen Editor]$ python PLCOpenEditor.py
File "PLCOpenEditor.py", line 37
print "\nUsage of PLCOpenEditor.py :"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("\nUsage of PLCOpenEditor.py :")?

Being Arch Linuz a rolling release distro, all differences I can see against Debian stretch (stable) are:
python2: Arch 2.7.15-1 / Debian 2.7.13-2
pyro: Arch 4.72-1 / Debian 1:3.14-5
python-numpy : Arch 1.14.5-1 / Debian 1:1.12.1-3
python-nevow : Arch 0.14.3-1 / Debian 0.14.2-1
python2-matplotlib : Arch 2.2.2-2/ Debian 2.0.0+dfsg1-2
python2-lxml : Arch 4.2.1-1 / Debian 3.7.1-1

However, IMHO syntax error in PLCOpenEditor.py doesn't appears being related to different patch versions of python in Arch and Debian, since both are python 2.7.
BTW: I don't know nothing about python nor about its syntax in V.2, V.3 and its minor versions  :-(

Is there any way to solve this problem?
PLCOpenEditor.py doesn't run beyond this error; I do not know if once this problem is solved, new synatxis or other errors will arise...

Your answers will be welcome!
Best regards,
DanielH

Quote 0 0
thiagoralves
I don’t really know how to solve this. PLCopen Editor is based on Python 2, and that’s why it uses prints without parenthesis “(“. Python 3 changed the syntax a little bit, and specifically one of the things was that it requires parenthesis on print statements. It seems that even though you have Python 2 installed, when you call the interpreter with the python command, it seems to be calling python 3 instead of 2. Have you tried to specifically call python 2 to open PLCopen Editor? Try something like:

python2.7 PLCOpenEditor.py
or
python2 PLCOpenEditor.py
Quote 0 0
DanielH
Dear Thiago:

You're right!!!

I've tried python2 PLCOpenEditor.py and PLCOpenEditor runs in my system, but...

terminal shows:
/usr/lib/python2.7/site-packages/wx-3.0-gtk3/wx/_core.py:16629: UserWarning: wxPython/wxWidgets release number mismatch
warnings.warn("wxPython/wxWidgets release number mismatch")
abort: there is no Mercurial repository here (.hg not found)

Creating a project, two issues arise :
1.
Project Properties dialog doesn't show all its items, can not be resized nor maximized.
I'm filling its data fields moving focus by means Tab and Shift Tab.

2.
Beggining a test project, I cann't create a new Program, despite the page size and grid resolution stated in Project Propierties, under FBD, LD and SFC tabs.
PLCOpenEditor Create s new POW dialog isn show, a "quasi null" area is immediatly created at center of graphics main area, and PLCOpenEditor hangs.
I have to kill it by means Xkill or htop.

Any clue?

Warning and error logs in terminal below my signature.

Best regards,
DanielH

<code>
(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.605: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkNotebook

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.605: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkNotebook

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.605: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkNotebook

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.609: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.609: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.609: for_size smaller than min-size (0 < 32) while measuring gadget (node entry, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.609: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.609: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.609: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.610: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.610: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.610: for_size smaller than min-size (0 < 32) while measuring gadget (node entry, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.610: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.610: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.610: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.611: for_size smaller than min-size (15 < 32) while measuring gadget (node entry, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.611: for_size smaller than min-size (15 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.611: for_size smaller than min-size (15 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.611: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.611: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.611: for_size smaller than min-size (0 < 32) while measuring gadget (node entry, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.611: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.611: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.612: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.612: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.612: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.612: for_size smaller than min-size (0 < 32) while measuring gadget (node entry, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.612: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.612: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.612: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.613: for_size smaller than min-size (15 < 32) while measuring gadget (node entry, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.613: for_size smaller than min-size (15 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.613: for_size smaller than min-size (15 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.613: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.613: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.613: for_size smaller than min-size (0 < 32) while measuring gadget (node entry, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.613: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.613: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.613: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.614: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.614: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.614: for_size smaller than min-size (0 < 32) while measuring gadget (node entry, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.614: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.614: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.614: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.615: for_size smaller than min-size (15 < 32) while measuring gadget (node entry, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.615: for_size smaller than min-size (15 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.615: for_size smaller than min-size (15 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.616: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node notebook, owner GtkNotebook)

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.616: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkNotebook

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.616: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkNotebook

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.616: Negative content width -2 (allocation 0, extents 1x1) while allocating gadget (node header, owner GtkNotebook)

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.616: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkNotebook

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.692: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node notebook, owner GtkNotebook)

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.692: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkNotebook

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.692: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkNotebook

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.692: Negative content width -2 (allocation 0, extents 1x1) while allocating gadget (node header, owner GtkNotebook)

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.692: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkNotebook

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.693: Negative content width -17 (allocation 1, extents 9x9) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.693: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.693: Negative content width -17 (allocation 1, extents 9x9) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.693: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.693: Negative content width -17 (allocation 1, extents 9x9) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.693: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.693: Negative content width -17 (allocation 1, extents 9x9) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.693: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.693: Negative content width -17 (allocation 1, extents 9x9) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.693: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.693: Negative content width -17 (allocation 1, extents 9x9) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.693: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.693: Negative content width -17 (allocation 1, extents 9x9) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.693: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.693: Negative content width -17 (allocation 1, extents 9x9) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.694: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.694: Negative content width -17 (allocation 1, extents 9x9) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.694: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.694: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.694: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.694: for_size smaller than min-size (0 < 32) while measuring gadget (node entry, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.694: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.694: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.694: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.694: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.694: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.694: for_size smaller than min-size (0 < 32) while measuring gadget (node entry, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.695: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.695: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.695: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.695: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node notebook, owner GtkNotebook)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.695: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node notebook, owner GtkNotebook)

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.695: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkNotebook

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.695: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkNotebook

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.695: Negative content width -2 (allocation 0, extents 1x1) while allocating gadget (node header, owner GtkNotebook)

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.695: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkNotebook

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.696: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.696: Negative content height -9 (allocation 1, extents 5x5) while allocating gadget (node button, owner GtkToggleButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.696: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node scrolledwindow, owner GtkScrolledWindow)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.696: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node scrolledwindow, owner GtkScrolledWindow)

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.696: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.700: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.700: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.701: for_size smaller than min-size (0 < 32) while measuring gadget (node entry, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.701: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.701: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.701: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.701: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.701: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.701: for_size smaller than min-size (0 < 32) while measuring gadget (node entry, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.701: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.701: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.701: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.702: for_size smaller than min-size (15 < 32) while measuring gadget (node entry, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.702: for_size smaller than min-size (15 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.702: for_size smaller than min-size (15 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.702: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.702: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.702: for_size smaller than min-size (0 < 32) while measuring gadget (node entry, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.703: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.703: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.703: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.703: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.703: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.703: for_size smaller than min-size (0 < 32) while measuring gadget (node entry, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.703: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.703: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.703: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.704: for_size smaller than min-size (15 < 32) while measuring gadget (node entry, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.704: for_size smaller than min-size (15 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.704: for_size smaller than min-size (15 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.704: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.704: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.705: for_size smaller than min-size (0 < 32) while measuring gadget (node entry, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.705: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.705: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.705: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.705: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.705: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.705: for_size smaller than min-size (0 < 32) while measuring gadget (node entry, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.705: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.705: for_size smaller than min-size (0 < 16) while measuring gadget (node button, owner GtkSpinButton)

(PLCOpenEditor.py:2913): Gtk-CRITICAL **: 22:00:27.705: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:00:27.706: for_size smaller than min-size (15 < 32) while measuring gadget (node entry, owner GtkSpinButton)


(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:01:40.310: Negative content width -17 (allocation 1, extents 9x9) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:01:40.310: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:01:40.310: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:01:40.310: Negative content height -9 (allocation 1, extents 5x5) while allocating gadget (node button, owner GtkToggleButton)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:01:40.310: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node entry, owner GtkEntry)

(PLCOpenEditor.py:2913): Gtk-WARNING **: 22:01:40.310: Negative content height -9 (allocation 1, extents 5x5) while allocating gadget (node button, owner GtkToggleButton)

Killing PLCOpenEditor by means Xkill:
Gdk-Message: 22:10:14.926: PLCOpenEditor.py: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
</code>

Quote 0 0
DanielH
Dear Thiago:

SOLVED by a workaround?

I've reading some topics in OpenPLC forum, and I understand that PLCOpenEditor is the Beremiz "core" that compiles IEC61131-3 schemas (Ladder, FBD, SFC) generating .st (structured text) files.
If I'm not wrong, your OpenPLC runtimes allows to upload these .st files to different targets, as RPI (Raspbian), Linux, Windows, etc.

So, I've installed Beremiz on my Arch Linux, following the How To in site https://beremiz.org/doc, and with the help of Andrej Skvortsov (Beremiz developer).

I had to replace python2-pyro 4.72-1 by a previous version python2-pyro3 3.16-1 (from AUR), and had to install python2-zeroconf.
Now Beremiz1.2-cc7a46953471 is running in my machine, and I'm following your reference-your-first-project to learn how to program and then how to download the .st file in RPI.

BTW: PLCOpenEditor still fails to run, showing the same issues detailed in my previous post, despite the python2-pyro replacement and the python2-zeroconf install...

I planned to program in Ladder on Beremiz IDE, and to upload the generated .st to a Raspberry Pi using your RPI runtime.
Mi RPI is an old 1 B model (512 MB RAM), I will install RASPBIAN STRETCH LITE (headless, non graphical, minimal image based on Debian Stretch) on it.
I planned to use your MODBus driver, and RTU slave devices to execute my first program (I don't want to use RPI GPIO).

Is this approach feasible?
Your toughts will be welcome.

Best regards,
DanielH
Quote 0 0
thiagoralves
Hi Daniel,

If Beremiz is running, try launching PLCOpenEditor.py from inside the Beremiz folder. If that also fails, I believe you can export .st files from Beremiz as well.

About your approach on the Pi, it should work fine. However, OpenPLC runtime v3 is lacking support for slave modbus devices, as I'm still building the frontend for that feature. You can use OpenPLC runtime v2 if you want to try it now. The installation instructions are pretty similar:

1. Install required packages: 
sudo apt-get update 
sudo apt-get install build-essential pkg-config bison flex autoconf automake libtool make nodejs git
2. Build
cd OpenPLC_v2
./build.sh
3. Start runtime
sudo nodejs server.js

At the end of the build process, it will ask you which driver you want to use. In your case, select the Modbus driver. The configuration of the Modbus driver is explained here:  http://www.openplcproject.com/getting-started-modbus-io

This process will be much simpler once v3 slave devices is ready, as all the configuration will be made graphically on the web server itself, with no need for external tools and configuration files.
Quote 0 0
DanielH
Dear Thiago:

I've tried to launch  PLCOpenEditor.py from inside the Beremiz folder, and it fails.
I'm working with native Beremiz IDE now, I need to learn so much...

OpenPLC runtime v3 with support for slave modbus devices will be welcome, when it arrives.
Meanwhile, I'll try OpenPLC runtime v2 and MODBus text configuration.

I'm trying to borrow Modbus I/O modules from my friends: hardware have become so expensive in my country, Argentina, after the huge devaluation of our currency, 50% in less than six months :-(

Best regards,
DanielH
Quote 0 0