question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

First installation feedback: unexpected keyword argument 'scope'

See original GitHub issue

Hi Brett,

first and foremost, thanks for opensourcing Contextualise!

I am giving it a try, and I incurred in an error when trying to open my first map. Here’s how to reproduce it:

  • logged in as admin@ as per readme
  • created new map with title, description and image (form won’t save without an image)
  • went to http://127.0.0.1:5000/topics/view/1/home and I got the following:
Traceback (most recent call last):
  File "/home/fradeve/.pyenv/versions/3.7.3/envs/contextualise/lib/python3.7/site-packages/flask/app.py", line 2463, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/fradeve/.pyenv/versions/3.7.3/envs/contextualise/lib/python3.7/site-packages/flask/app.py", line 2449, in wsgi_app
    response = self.handle_exception(e)
  File "/home/fradeve/.pyenv/versions/3.7.3/envs/contextualise/lib/python3.7/site-packages/flask/app.py", line 1866, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/fradeve/.pyenv/versions/3.7.3/envs/contextualise/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/fradeve/.pyenv/versions/3.7.3/envs/contextualise/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/fradeve/.pyenv/versions/3.7.3/envs/contextualise/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/fradeve/.pyenv/versions/3.7.3/envs/contextualise/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/fradeve/.pyenv/versions/3.7.3/envs/contextualise/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/fradeve/.pyenv/versions/3.7.3/envs/contextualise/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/fradeve/.pyenv/versions/3.7.3/envs/contextualise/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/fradeve/contextualise/contextualise/topic.py", line 68, in view
    resolve_attributes=RetrievalMode.RESOLVE_ATTRIBUTES,
TypeError: get_topic() got an unexpected keyword argument 'scope'

Any idea of what might have gone wrong?

Thank you very much again!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
brettkromkampcommented, Feb 9, 2020

@fradeve The problem is related to a recent refactoring in which I added a scope property to the BaseName class. However, I forgot to update the accompanying Contextualise/TopicDB database (SQL) creation script: https://gist.github.com/brettkromkamp/87aaa99b056578ff1dc23a43a49aca89

So, there is a basename table in the contextualise schema/database that requires the addition of the scope field. I’ll provide a fix for this issue, sometime tomorrow. Sorry for the inconvenience.

1reaction
brettkromkampcommented, Feb 9, 2020

@fradeve @charlestondance I think I know what is causing the error: I have made some changes to TopicDB (https://github.com/brettkromkamp/topic-db), the topic map engine that Contextualise uses. Nonetheless, I haven’t pushed the latest version to PyPI (and updated Contextualise’s dependencies accordingly), yet. A temporary work-around would be to uninstall TopicDB (version 1.0) with pip uninstall topic-db followed by cloning TopicDB and doing a pip install -e . inside TopicDB’s top-level directory. Please let me know if this work-around fixes things. In the meantime, I will publish the latest version of TopicDB to PyPI.

Read more comments on GitHub >

github_iconTop Results From Across the Web

call() got an unexpected keyword argument 'scope' · Issue ...
Potential Bugs/Feature Requests/Usage Questions Only: Any unexpected problems: PLEASE ALWAYS INCLUDE: What you did:.
Read more >
Python - got an unexpected keyword argument 'scope'
I am trying to run the 1.0-lunarlander-sim.ipynb file from the Deep Assist GitHub repo. But I keep getting an error: got an unexpected...
Read more >
Working with the AWS CDK in Python
All AWS Construct Library classes are instantiated using three arguments: the scope in which the construct is being defined (its parent in the...
Read more >
Databricks Utilities - Azure - Microsoft Learn
Understand and learn how to use Databricks Utilities to work with object storage, to chain and parameterize notebooks, and to work with ...
Read more >
Using OAuth 2.0 for Web Server Applications | YouTube Data ...
This document explains how web server applications use Google API Client Libraries or Google OAuth 2.0 endpoints to implement OAuth 2.0 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found