I am just getting started with the X4 Starter Kit.
I have gone through the process of running the dia
demo on the PC, via the CLI and the web interface.
I ran make.py, then transferred the dia.zip file to the
X4.
When I tried to execute
python dia.py dia.yml
I saw a message telling me that the 40002643_A.zip level
of Python was old and I should use 40002643_B.zip,
downloading, renaming to python.zip, then copying to
the X4.
Which I did. Now when I try again:
#> python dia.py dia.yml
Traceback (most recent call last):
File “”, line 35, in ?
File “WEB/python/python.zip/os.py”, line 1
m≥
^
SyntaxError: invalid syntax
Any thoughts? My apologies if I am doing something
incredibly stupid.
Traceback (most recent call last):
File “”, line 161, in ?
File “”, line 82, in main
zipimport.ZipImportError: bad local file header in WEB/python/dia.zip
How picky is this stuff about Python version? It wants 2.4.3, but I was only able to find 2.4.4.
When you’re uploading dia.zip, make sure that it uploaded fully before attempting to start the Dia. It might be a good check to download the zip file from the device to your PC, and make sure it can still be extracted/read there.
The Python on the Digi device isn’t picky enough to care between versions 2.4.3 and 2.4.4
The “bad loacl file header” is caused when you upload the dia.zip after having already started the iDigi Dia. Is it possible that you have the iDigi Dia configured to auto-start?
Have a look under Applications->Python and then click on the “Auto-Start Settings” heading on the ConnectPort X4’s Web UI.
If there is something configured to auto-start, disable it for now. If there is nothing that is configured to auto-start dive your ConnectPort X4 a reboot one more time and then try and start your Dia application manually once again.
However, I’ve realized that I really do have to reboot the unit after every .zip file upload (why would this be?..and, that would be a good piece of advice to put in the tutorial).
I am getting much farther, but am still not out of the woods.
dia.py is unable to find the settings file. I can see it there in dia.zip. Will go back later and reverify that there is really a good version of that file in there.
You must restart due to a techincal implementation detail of the ConnectPort X device’s filesystem.
The filesystem on the ConnectPort X does not support timestamps. Since there are no timestamps it is difficult to tell when a file has changed. Python caches the structure of a given .zip file for speed. If you replace the file this cached representation of internal structure becomes invalid and hence you must reboot.
Keep us posted on what you discover. Feel free to attach your generated dia.zip file. We’ll get you running!
As for the problem with it not finding the settings file…
If you run “python dia.py” it will try to use the default settings file in dia.zip.
You were specifying the settings file with “python dia.py dia.yml”. In this case I believe it won’t look for it in dia.zip, and you would have to upload it separately to the device.
Give it another try running it without the configuration file specified and see how that works for you.
Being brand new I was happy to see this thread since I was having the exact series of problems that chuckw was describing. I too was using 2.4.4 because it was easy to spot and then downloaded 2.4.3 after looking for it and this didn’t make a difference…
I just tried this last suggestion of uploading the dia.yml along with the dia.zip file and I have gotten through it all the way now. I would recommend changing the documentation in the “idigi-dia-102.pdf” file to reflect this solution.
I was wondering why timestamps don’t appear on the Python Configuration/Manage files Section of ConnectPortX4 but Jordan answered this one too.
My only question is why is there this warning when running the command “python dia.py dia.yml” -
Transform(count_by_two) cannot update property, it does not exist
Everything seems to be fine now for me but I am just curious about this.
That warning is a peculiarity of the transform driver. The transform driver takes an input channel and modifies a sample by the defined equation and places the result into a different channel.
Because of the way the DIA starts up, it is not guaranteed that the input channel will exist before the transform driver attempts to read and process it. The warning itself is not an issue unless the DIA fully starts up and you continue to see the warning. That would then indicate the DIA is misconfigured.