DNP3/Python roadblock

329 views
Skip to first unread message

Jason Templeman

unread,
Oct 23, 2017, 2:11:47 PM10/23/17
to open-dnp3
I'm looking to write a Python script to test an Outstation. After much searching I decided to try opendnp3. I'm a tester and not a developer and new to C++ and SWIG. I'm also not a Linux person but that is another story.
Looking at the docs online I ran configure with the --with-python option and performed a make. I see a pyopendnp3.py file created but I do not see any opendnp3 modules in my usr/lib/Python2.7/ folder. How do I get to the point where my import opendnp3 will pass?

Also, is there any Python script/demos/examples out there other than master_demo.py (https://github.com/cverges/dnp3/blob/master/demos/master-python/master_demo.py)?

Would love to see a working demo of connection to a Outstation via TCP and retrieving data.

Message has been deleted
Message has been deleted

Jason Templeman

unread,
Oct 26, 2017, 12:57:59 PM10/26/17
to open-dnp3
Getting this error

Traceback (most recent call last):
File "/home/eaton/src/_config_local/tk-test-suite/pxTests/dnp3_1.py", line 126, in <module>
main()
File "/home/eaton/src/_config_local/tk-test-suite/pxTests/dnp3_1.py", line 88, in main
stack_manager = opendnp3.StackManager()
File "/home/eaton/src/_config_local/tk-test-suite/libs/pyopendnp3.py", line 2120, in __init__
this = _pyopendnp3.new_StackManager(*args)
TypeError: new_StackManager() takes exactly 2 arguments (0 given)

Thoughts?

Jason Templeman

unread,
Oct 26, 2017, 1:12:45 PM10/26/17
to open-dnp3
$ python master_demo.py
Traceback (most recent call last):
File "master_demo.py", line 8, in <module>
import opendnp3
File "/usr/lib/python2.7/site-packages/opendnp3/__init__.py", line 1, in <module>
from pyopendnp3 import *
File "/usr/lib/python2.7/site-packages/opendnp3/pyopendnp3.py", line 26, in <module>
_pyopendnp3 = swig_import_helper()
File "/usr/lib/python2.7/site-packages/opendnp3/pyopendnp3.py", line 18, in swig_import_helper
import _pyopendnp3
ImportError: No module named _pyopendnp3

Thoughts?

Reply all
Reply to author
Forward
0 new messages