Dear Miguel Moreto,
Thank you very much for this library to open comtrade files! You just made my life so much easier! You deserve an oscar!
Follows the issue description:
If the filepath for *.cfg file don't starts with . the program breaks.
Within the file example1.py
change the line
comtradeObj = pyComtrade.ComtradeRecord('./test_data3/test3.cfg')
to
comtradeObj = pyComtrade.ComtradeRecord('test_data3/test3.cfg')
and you get
No data file content. Use the method ReadDataFile first
No data file content. Use the method ReadDataFile first
Traceback (most recent call last):
File "example1_l.py", line 66, in
axarr[0].plot(time, AnalogChannelData)
File "/usr/lib/python2.7/dist-packages/matplotlib/init.py", line 1814, in inner
return func(ax, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/matplotlib/axes/_axes.py", line 1424, in plot
for line in self._get_lines(*args, **kwargs):
File "/usr/lib/python2.7/dist-packages/matplotlib/axes/_base.py", line 386, in _grab_next_args
for seg in self._plot_args(remaining, kwargs):
File "/usr/lib/python2.7/dist-packages/matplotlib/axes/_base.py", line 364, in _plot_args
x, y = self._xy_from_xy(x, y)
File "/usr/lib/python2.7/dist-packages/matplotlib/axes/_base.py", line 223, in _xy_from_xy
raise ValueError("x and y must have same first dimension")
ValueError: x and y must have same first dimension
I do have a proposal to correct the method ReadDataFile(), however I'm still struggling with git and github! ASAP, I'll do a pullrequest. I'm used to mercurial and bitbucket.