Comments (3)
Example traceback:
[2018-03-20 17:21:35,409: ERROR/ForkPoolWorker-18] Task external_api.tasks.run_scheduled_task[797ad0a9-0318-43fd-bb69-bbc8272c8529] raised unexpected: UnboundLocalError("local variable 'token' referenced before assignment",)
Traceback (most recent call last):
File "/opt/Conversus/venv/local/lib/python3.6/site-packages/celery/app/trace.py", line 374, in trace_task
R = retval = fun(*args, **kwargs)
File "/opt/Conversus/venv/local/lib/python3.6/site-packages/celery/app/trace.py", line 629, in __protected_call__
return self.run(*args, **kwargs)
File "/opt/Conversus/external_api/tasks.py", line 216, in run_scheduled_task
scheduled_task[0].run()
File "/opt/Conversus/external_api/models.py", line 269, in run
self._run_span()
File "/opt/Conversus/external_api/models.py", line 315, in _run_span
'data_source_info': import_options})
File "/opt/Conversus/external_api/data_targets/brandwatch.py", line 46, in push_data
self.push_subscription_results(**kwargs)
File "/opt/Conversus/external_api/data_targets/brandwatch.py", line 93, in push_subscription_results
self.login(data_source_info['credential'], data_source_info)
File "/opt/Conversus/external_api/data_targets/brandwatch.py", line 31, in login
client_id="partner-api-client")
File "/opt/Conversus/venv/local/lib/python3.6/site-packages/bwproject.py", line 230, in __init__
super().__init__(token=token, token_path=token_path, username=username, password=password, grant_type=grant_type, client_id=client_id, apiurl=apiurl)
File "/opt/Conversus/venv/local/lib/python3.6/site-packages/bwproject.py", line 51, in __init__
self._write_auth(token_path)
File "/opt/Conversus/venv/local/lib/python3.6/site-packages/bwproject.py", line 91, in _write_auth
user_tokens = self._read_auth_file(token_path)
File "/opt/Conversus/venv/local/lib/python3.6/site-packages/bwproject.py", line 106, in _read_auth_file
user_tokens[user.lower()] = token
UnboundLocalError: local variable 'token' referenced before assignment
from api_sdk.
from api_sdk.
Hey @anthonybu if you are still having issues with this, could you provide some example code in addition to the stack trace? Thanks
from api_sdk.
Related Issues (20)
- Allowing lists of startDates in "get_mentions" HOT 2
- BWProjects should take a BWUser instance HOT 2
- Add a rename() method HOT 1
- `BWRules.get()` returns a list with one item HOT 1
- patch_mentions allows users pass in multiple parent categories HOT 2
- pypi still at 1.1.2 HOT 1
- Port rule backfill to use new bulk-actions endpoint HOT 2
- Backfill_date not getting updated: upload_all
- Extract data from group HOT 2
- Does the parameter: Exclude Category can be used in the API? HOT 2
- Change token request from GET to POST
- KeyError: 'id_str' when using upload_all_channel HOT 2
- username with capital letters HOT 4
- Don't sleep before each requests
- Bug in chart calls which break down by specific tags
- Modify how tokens are passed in API calls
- from authenticate import authenticate HOT 6
- Duplicate resource name in BWResource.ids HOT 2
- filter zero value when retrieve dimension data HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api_sdk.