reloadware/reloadium

Can't work with Pycord

Opened this issue · 0 comments

Describe the bug*

Whenever I try to run Reloadium in Pycharm with Pycord I get:

Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "C:\Users\name\PycharmProjects\Flashcards Discord Bot\.venv\Lib\site-packages\discord\__init__.py", line 27, in <module>
    from . import abc, opus, sinks, ui, utils
  File "C:\Users\name\PycharmProjects\Flashcards Discord Bot\.venv\Lib\site-packages\discord\ui\__init__.py", line 11, in <module>
    from .button import *
  File "C:\Users\name\PycharmProjects\Flashcards Discord Bot\.venv\Lib\site-packages\discord\ui\button.py", line 35, in <module>
    from .item import Item, ItemCallbackType
  File "C:\Users\name\PycharmProjects\Flashcards Discord Bot\.venv\Lib\site-packages\discord\ui\item.py", line 30, in <module>
    from ..interactions import Interaction
  File "C:\Users\name\PycharmProjects\Flashcards Discord Bot\.venv\Lib\site-packages\discord\interactions.py", line 49, in <module>
    from .webhook.async_ import (
  File "C:\Users\name\PycharmProjects\Flashcards Discord Bot\.venv\Lib\site-packages\discord\webhook\__init__.py", line 11, in <module>
    from .async_ import *
  File "C:\Users\name\PycharmProjects\Flashcards Discord Bot\.venv\Lib\site-packages\discord\webhook\async_.py", line 107, in __init__
    self._locks: weakref.WeakValueDictionary = weakref.WeakValueDictionary()
                                               ^^^^^^^
UnboundLocalError: cannot access local variable 'weakref' where it is not associated with a value

This only happens when you import SelectOption from Pycord's UI library.

To Reproduce

Steps to reproduce the behavior:

  1. Install Pycord
  2. Import from discord import SelectOption
  3. Run Reloadium
  4. See error

Expected behavior

For it to properly reload or for me to exclude that part of the library from Reloadium.
I tried to exclude it by having:
Exclusing paths

Which should exclude the path, but it doesn't and I still get the error.

Desktop or remote (please complete the following information):**

  • OS: Windows
  • M1 chip: No
  • PyCharm plugin version: 1.5.1
  • Editor: Pycharm
  • Python Version: Python 3.11
  • Python Architecture: 64 bit
  • Run mode: Run