Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using a Google Spreadsheet that includes a pivot table #297

Open
alykat opened this issue Nov 8, 2018 · 0 comments
Open

Error when using a Google Spreadsheet that includes a pivot table #297

alykat opened this issue Nov 8, 2018 · 0 comments

Comments

@alykat
Copy link
Member

alykat commented Nov 8, 2018

Newish-to-me bug:

I created a pivot table in an existing graphic (trump-twitter-endorsements-senate-20181107) to verify some category counts. When I went back to the graphic, I got the following error:

Traceback (most recent call last):
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/flask/app.py", line 1701, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/flask/app.py", line 1689, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/flask/app.py", line 1687, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/flask/app.py", line 1360, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/flask/app.py", line 1358, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/flask/app.py", line 1344, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/ahurt/src/dailygraphics/oauth.py", line 86, in decorated_function
    return f(*args, **kwargs)
  File "/Users/ahurt/src/dailygraphics/graphic.py", line 56, in _graphics_detail
    context['COPY'] = copytext.Copy(filename=copy_path)
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/copytext.py", line 187, in __init__
    self.load()
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/copytext.py", line 203, in load
    book = load_workbook(self._filename, data_only=True)
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/openpyxl/reader/excel.py", line 224, in load_workbook
    pivot_caches = parser.pivot_caches
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/openpyxl/packaging/workbook.py", line 125, in pivot_caches
    cache = get_rel(self.archive, self.rels, id=c.id, cls=CacheDefinition)
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/openpyxl/packaging/relationship.py", line 162, in get_rel
    obj.deps = get_dependents(archive, rels_path)
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/openpyxl/packaging/relationship.py", line 130, in get_dependents
    rels = RelationshipList.from_tree(node)
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/openpyxl/descriptors/serialisable.py", line 84, in from_tree
    obj = desc.expected_type.from_tree(el)
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/openpyxl/descriptors/serialisable.py", line 100, in from_tree
    return cls(**attrib)
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/openpyxl/packaging/relationship.py", line 50, in __init__
    self.Target = Target
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/openpyxl/descriptors/base.py", line 44, in __set__
    raise TypeError('expected ' + str(self.expected_type))
TypeError: expected <type 'basestring'>

Deleting the pivot table fixed the issue (but isn't great as a long-term solution).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant