GithubHelp home page GithubHelp logo

Comments (3)

anthonybu avatar anthonybu commented on July 28, 2024

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.

anthonybu avatar anthonybu commented on July 28, 2024

@amybarker

from api_sdk.

jessicabowden avatar jessicabowden commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.