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.

NameError: name 'CONF_OAUTH_LOGIN' is not defined

See original GitHub issue

Describe the bug A clear and concise description of what the bug is.

After updated to version 4.0.0, I keep getting this setup error:

Logger: homeassistant.setup Source: custom_components/alexa_media/init.py:174 Integration: Alexa Media Player (documentation, issues) First occurred: 6:48:51 AM (1 occurrences) Last logged: 6:48:51 AM

Error during setup of component alexa_media Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/setup.py”, line 235, in _async_setup_component result = await task File “/config/custom_components/alexa_media/init.py”, line 174, in async_setup CONF_OAUTH_LOGIN: account.get(CONF_OAUTH_LOGIN, True), NameError: name ‘CONF_OAUTH_LOGIN’ is not defined

I had completely removed the integration, configuration, and attempted start from the beginning, but the same error occurs every time I restarted Home Assistant.

To Reproduce Steps to reproduce the behavior:

  1. Go to ‘…’
  2. Click on ‘…’
  3. Scroll down to ‘…’
  4. See error
  • Add the integration using HACS
  • Configure in configuration.yaml
  • Boot up Home Assistant and I can see the error. No other steps are needed to duplicate the issue.

Expected behavior A clear and concise description of what you expected to happen.

I expect that when starting from scratch, I should be able to successfully add the integration and authenticate.

Screenshots If applicable, add screenshots to help explain your problem.

System details

  • Home-assistant (version): 2022.5.5
  • Hassio (Yes/No): (Please note you may have to restart hassio 2-3 times to load the latest version of alexapy after an update. This looks like a HA bug).
  • alexa_media (version from const.py or HA startup): 4.0.0
  • alexapy (version from pip show alexapy or HA startup): 4.0.0
  • Amazon 2FA is enabled (y/n). We will not debug login issues if unanswered: Yes

Logs Please provide logs. We’ll be most likely asking for them anyway.

The two files, alexa_media.(email).get.html alexa_media.(email).post.html are NOT found because the setup never took place.

Additional context Add any other context about the problem here.

I have tried to uninstall and re-install at least 3 times without success.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:11

github_iconTop GitHub Comments

5reactions
khal3dcommented, May 29, 2022

As a quick fix for us till it gets solved 😃

  1. Open custom_components/alexa_media/const.py and add the following to the line 48

    CONF_OAUTH_LOGIN = "oauth_login"
    
  2. Open custom_components/alexa_media/__init__.py and add the following to line 70

    CONF_OAUTH_LOGIN,
    

Restart Home Assistant, and open the integrations section as it might require to reauthenticate

0reactions
miciumcommented, May 29, 2022

I continue to have authentication problems with version 4.0.1. I did a roll-back to v3.11.3 and everything works fine … Many thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

NameError: name 'List' is not defined - python - Stack Overflow
If I try importing List first I get an error No module named 'List' . I'm using Python 3.7.3 from Anaconda. python ·...
Read more >
Python nameerror name is not defined Solution - Career Karma
A NameError is raised when you try to use a variable or a function name that is not valid. In Python, code runs...
Read more >
NameError: Name plot_cases_simple is Not Defined
In Python, the NameError occurs when you try to use a variable, function, or module that doesn't exist or wasn't used in a...
Read more >
NameError: name 'os' is not defined - LearnDjango.com
Starting with Django 3.1, the startproject command generates a settings.py file that imports pathlib rather than os on the top line. The quick ......
Read more >
NameError: name 'os' is not defined - Forums - IBM Support
NameError : name 'os' is not defined. I used. for root, dirs, files in os.walk(pfad, topdown=True): .... can someone help me with this?...
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