juanmcasillas / gopro2gpx

Parse the gpmd stream for GOPRO moov track (MP4) and extract the GPS info into a GPX (and kml) file.
GNU General Public License v3.0
194 stars 49 forks source link

GoPro 8 file: AttributeError: 'array.array' object has no attribute 'fromstring' #6

Closed rmoriz closed 3 years ago

rmoriz commented 3 years ago
➜  gopro-workflow gopro2gpx GX040143.mp4 data.gpx
Traceback (most recent call last):
  File "/usr/local/bin/gopro2gpx", line 33, in <module>
    sys.exit(load_entry_point('gopro2gpx==0.1', 'console_scripts', 'gopro2gpx')())
  File "/usr/local/lib/python3.9/site-packages/gopro2gpx/gopro2gpx.py", line 148, in main
    data = parser.readFromMP4()
  File "/usr/local/lib/python3.9/site-packages/gopro2gpx/gpmf.py", line 58, in readFromMP4
    metadata = self.parseStream(metadata_raw)
  File "/usr/local/lib/python3.9/site-packages/gopro2gpx/gpmf.py", line 90, in parseStream
    data.fromstring(data_raw)
AttributeError: 'array.array' object has no attribute 'fromstring'
Simske commented 3 years ago

You seem to be on Python 3.9, as array.array.fromstring() was renamed to array.array.frombytes() in Python 3.2, and will be completely removed in 3.9. (see Python 3.8 docs)

I will check this and submit a pull request