tkrajina / gpxpy

gpx-py is a python GPX parser. GPX (GPS eXchange Format) is an XML based file format for GPS tracks.
Apache License 2.0
1.01k stars 223 forks source link

TypeError: argument of type 'builtin_function_or_method' is not iterable #47

Closed rahulvgmail closed 8 years ago

rahulvgmail commented 9 years ago

could this be some missing library? (the file loads fine on the site you have hosted)

i will paste gpx file in comment.

File "/home/vagrant/.virtualenvs/trip2/lib/python3.4/site-packages/gpxpy/parser.py", line 423, in __parse_track_segment if self.xml_parser.get_node_name(child_node) == 'trkpt': File "/home/vagrant/.virtualenvs/trip2/lib/python3.4/site-packages/gpxpy/parser.py", line 130, in get_node_name if '}' in node.tag: TypeError: argument of type 'builtin_function_or_method' is not iterable

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "", line 1, in File "/home/vagrant/.virtualenvs/trip2/lib/python3.4/site-packages/gpxpy/init.py", line 32, in parse return parser.parse() File "/home/vagrant/.virtualenvs/trip2/lib/python3.4/site-packages/gpxpy/parser.py", line 219, in parse raise mod_gpx.GPXXMLSyntaxException('Error parsing XML: %s' % str(e), e) gpxpy.gpx.GPXXMLSyntaxException: Error parsing XML: argument of type 'builtin_function_or_method' is not iterable

rahulvgmail commented 9 years ago

<?xml version="1.0"?>

1842.000.00 1831.000.00 1831.000.00 1835.000.00 1834.000.00 1834.000.00 1835.000.00 1833.000.00 1831.000.00 1831.000.00 1831.000.00 1831.000.00 1830.000.00 2743.000.00 1842.00 1804.00 1631.00 1624.00 1442.00 1588.00 1605.00 1650.00 1795.00 1816.00 1814.00 1809.00 1810.00 1806.00 1801.00 1801.00 1808.00 1779.00 1762.00 573.00 1394.00 1280.00 2751.00 2765.00 2743.00
rahulvgmail commented 9 years ago

Full Stack Trace

gpx_file = open('/vagrant/data/2014-11-06_044915_AutoLog_Gangtok (copy).gpx', 'r')

gpx= gpxpy.parse(gpx_file) ERROR:root:argument of type 'builtin_function_or_method' is not iterable Traceback (most recent call last): File "/home/vagrant/.virtualenvs/trip2/lib/python3.4/site-packages/gpxpy/parser.py", line 204, in parse self.parse_dom() File "/home/vagrant/.virtualenvs/trip2/lib/python3.4/site-packages/gpxpy/parser.py", line 254, in __parse_dom self.gpx.tracks.append(self.parse_track(node)) File "/home/vagrant/.virtualenvs/trip2/lib/python3.4/site-packages/gpxpy/parser.py", line 413, in parse_track track_segment = self.parse_track_segment(child_node) File "/home/vagrant/.virtualenvs/trip2/lib/python3.4/site-packages/gpxpy/parser.py", line 423, in parse_track_segment if self.xml_parser.get_node_name(child_node) == 'trkpt': File "/home/vagrant/.virtualenvs/trip2/lib/python3.4/site-packages/gpxpy/parser.py", line 130, in get_node_name if '}' in node.tag: TypeError: argument of type 'builtin_function_or_method' is not iterable Traceback (most recent call last): File "/home/vagrant/.virtualenvs/trip2/lib/python3.4/site-packages/gpxpy/parser.py", line 204, in parse self.__parse_dom() File "/home/vagrant/.virtualenvs/trip2/lib/python3.4/site-packages/gpxpy/parser.py", line 254, in parse_dom self.gpx.tracks.append(self.parse_track(node)) File "/home/vagrant/.virtualenvs/trip2/lib/python3.4/site-packages/gpxpy/parser.py", line 413, in parse_track track_segment = self.parse_track_segment(child_node) File "/home/vagrant/.virtualenvs/trip2/lib/python3.4/site-packages/gpxpy/parser.py", line 423, in parse_track_segment if self.xml_parser.get_node_name(child_node) == 'trkpt': File "/home/vagrant/.virtualenvs/trip2/lib/python3.4/site-packages/gpxpy/parser.py", line 130, in get_node_name if '}' in node.tag: TypeError: argument of type 'builtin_function_or_method' is not iterable

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "", line 1, in File "/home/vagrant/.virtualenvs/trip2/lib/python3.4/site-packages/gpxpy/init.py", line 32, in parse return parser.parse() File "/home/vagrant/.virtualenvs/trip2/lib/python3.4/site-packages/gpxpy/parser.py", line 219, in parse raise mod_gpx.GPXXMLSyntaxException('Error parsing XML: %s' % str(e), e) gpxpy.gpx.GPXXMLSyntaxException: Error parsing XML: argument of type 'builtin_function_or_method' is not iterable

LP1LP commented 4 years ago

TypeError: argument of type 'builtin_function_or_method' is not iterable