matyalatte / Blender-Uasset-Addon

Blender addon to import assets from .uasset files
MIT License
38 stars 18 forks source link

Cannot enable addon (ConnectionError for requests.get) #9

Open Kein opened 1 year ago

Kein commented 1 year ago
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Programs\Blender\293\2.93\scripts\modules\addon_utils.py", line 351, in enable
    mod = __import__(module_name)
  File "D:\Programs\Blender\293\2.93\scripts\addons\blender_uasset_addon\__init__.py", line 35, in <module>
    from . import \
  File "D:\Programs\Blender\293\2.93\scripts\addons\blender_uasset_addon\get_new_release.py", line 29, in <module>
    latest_version, is_valid_tag, title, body = get_release_info()
  File "D:\Programs\Blender\293\2.93\scripts\addons\blender_uasset_addon\get_new_release.py", line 10, in get_release_info
    response = requests.get("https://api.github.com/repos/matyalatte/Blender-Uasset-Addon/releases/latest")
  File "D:\Programs\Blender\293\2.93\python\lib\site-packages\requests\api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "D:\Programs\Blender\293\2.93\python\lib\site-packages\requests\api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "D:\Programs\Blender\293\2.93\python\lib\site-packages\requests\sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "D:\Programs\Blender\293\2.93\python\lib\site-packages\requests\sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "D:\Programs\Blender\293\2.93\python\lib\site-packages\requests\adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: /repos/matyalatte/Blender-Uasset-Addon/releases/latest (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001AB8C504880>: Failed to establish a new connection: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions'))

Tried all possible version of Blender

matyalatte commented 1 year ago

Thanks for the report.

Can you try this? I think I fixed the issue. blender_uasset_addon_v0.2.1-hotfix2.zip

Kein commented 1 year ago

I dont see a respective commit? Ah nevermind, I see you've wrappe network request in try/catch, expected mitigation. Yeah, it loads and can be enabled now.

matyalatte commented 1 year ago

yeah, fixed at this commit. https://github.com/matyalatte/Blender-Uasset-Addon/commit/846e7f397c9c9557a5bca85fba9223a264ce75e1

Thanks for the testing. I'll close this issue after releasing the next version.