sid5432 / pyOTDR

Simple OTDR SOR file parser written in Python
GNU General Public License v3.0
71 stars 28 forks source link

Error on run python3.6 #4

Closed pochubayk closed 6 years ago

pochubayk commented 6 years ago

Traceback (most recent call last): File "pyOTDR.py", line 7, in import read File "/home/www/read.py", line 6, in from . import parts ImportError: attempted relative import with no known parent package

sid5432 commented 6 years ago

I can't reproduce the exact error you are seeing (with python 3.6.3), but it may be related to the file organization. Your traceback shows "/home/www/read.py"; all the files should be under the folder pyOTDR. It looks like you have all the files under /home/www instead?

pochubayk commented 6 years ago

@sid5432 I was able to get it working have you had any luck taking the data and displaying a graph?

sid5432 commented 6 years ago

I'm a bit confused: this is just a simple program designed to spit out a tab delimited data file (two columns), with the file name like demo_ab-trace.dat. Plotting and displaying the data is up to you, with the help of some other plotting program (you can even use Excel, if that is your cup of tea). Are you running this using the Docker container? The set up as it is right now with the Docker build and execution dumps the trace file inside the container, which goes away afterwards, so you'll never see the trace file. I am modifying that, but haven't committed the code to Github yet.