Skip to content

Exception when building xpath query #46

@t8y8

Description

@t8y8

I managed to trigger this when downloading workbooks from alpo.

This was done against the HEAD of a local copy of #45

`Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/xml/etree/ElementPath.py", line 263, in iterfind
selector = _cache[cache_key]
KeyError: (".//metadata-record[@Class='column'][local-name='[Today's Date]']", None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "runner.py", line 30, in
fields = wb_model.datasources[0].fields
File "/Users/tdoyle/Documents/py/document-api-python/tableaudocumentapi/datasource.py", line 135, in fields
self._fields = self._get_all_fields()
File "/Users/tdoyle/Documents/py/document-api-python/tableaudocumentapi/datasource.py", line 141, in _get_all_fields
return collections.OrderedDict([(k, v) for k, v in column_objects])
File "/Users/tdoyle/Documents/py/document-api-python/tableaudocumentapi/datasource.py", line 141, in
return collections.OrderedDict([(k, v) for k, v in column_objects])
File "/Users/tdoyle/Documents/py/document-api-python/tableaudocumentapi/datasource.py", line 140, in
for xml in self._datasourceTree.findall('.//column'))
File "/Users/tdoyle/Documents/py/document-api-python/tableaudocumentapi/datasource.py", line 17, in _mapping_from_xml
metadata_record = root_xml.find(xpath)
File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/xml/etree/ElementTree.py", line 649, in find
return self._root.find(path, namespaces)
File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/xml/etree/ElementPath.py", line 298, in find
return next(iterfind(elem, path, namespaces), None)
File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/xml/etree/ElementPath.py", line 277, in iterfind
selector.append(ops[token[0]](next, token))
File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/xml/etree/ElementPath.py", line 233, in prepare_predicate
raise SyntaxError("invalid predicate")
SyntaxError: invalid predicate`

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy