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.

Error when trying to authenticate on Windows10

See original GitHub issue

Hi,

When i’m trying to use “authorise account” on Windows i got:

Traceback (most recent call last):
  File "C:\Users\darek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pystray\_win32.py", line 401, in _dispatcher
    return int(icon._message_handlers.get(
  File "C:\Users\darek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pystray\_win32.py", line 213, in _on_notify
    descriptors[index - 1](self)
  File "C:\Users\darek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pystray\_base.py", line 324, in inner
    callback(self)
  File "C:\Users\darek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pystray\_base.py", line 449, in __call__
    return self._action(icon, self)
  File "C:\Users\darek\Desktop\email-oauth2-proxy-main\emailproxy.py", line 1983, in authorise_account
    webview.start(gui=forced_gui, debug=Log.get_level() == logging.DEBUG)
  File "C:\Users\darek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\webview\__init__.py", line 122, in start
    guilib = initialize(gui)
  File "C:\Users\darek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\webview\guilib.py", line 101, in initialize
    if not try_import(guis):
  File "C:\Users\darek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\webview\guilib.py", line 62, in try_import
    if import_func():
  File "C:\Users\darek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\webview\guilib.py", line 52, in import_winforms
    import webview.platforms.winforms as guilib
  File "C:\Users\darek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\webview\platforms\winforms.py", line 31, in <module>
    import clr
  File "C:\Users\darek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\clr.py", line 6, in <module>
    load()
  File "C:\Users\darek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pythonnet\__init__.py", line 42, in load
    func = _LOADER_ASSEMBLY["Python.Runtime.Loader.Initialize"]
TypeError: 'Assembly' object is not subscriptable

I tried this on two Windows 10 instances with the same result.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
yon-ycommented, Oct 5, 2022

d1a7421 temporarily adds a new requirement for Python 3.10 on Windows, which resolves the issue until pywebview is updated. You can also do this manually via:

python -m pip install clr-loader==0.1.7
python -m pip install pythonnet==3.0.0a2

That works for me. Thank you!

1reaction
dbilewiczcommented, Oct 1, 2022

d1a7421 temporarily adds a new requirement for Python 3.10 on Windows, which resolves the issue until pywebview is updated. You can also do this manually via:

python -m pip install clr-loader==0.1.7
python -m pip install pythonnet==3.0.0a2

Correct, that helped. Authorise web window is now vissible and program did not crashed. Thanks alot!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix Windows 10 Remote Desktop Authentication Errors
One of the most frequent errors that Remote Desktop may throw is this one: “An authentication error has occurred. The function requested is ......
Read more >
User can't authenticate or must authenticate twice
Troubleshooting an issue in which user can't authenticate or must authenticate twice when starting a remote desktop connection.
Read more >
FIX: Remote desktop authentication error on Windows 10/11
An authentication error has occurred error message pops up on your desktop when you try to connect to another PC with the Remote...
Read more >
How to Fix Windows 10 Login Problems [EXPERT GUIDE]
Uncheck the “Turn on fast startup (recommended)” option and click Save changes. You can try and restart your computer normally to see if...
Read more >
Azure AD authentication troubleshooting: Known problems ...
Reboot and try again. More aggressive registry key removal specific to 1st error: HKCU\SOFTWARE\Microsoft\OneDrive\Accounts\Business1. Delete ...
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