Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't work with Pycord #201

Open
Blue-Robin-Taken opened this issue Sep 23, 2024 · 0 comments
Open

Can't work with Pycord #201

Blue-Robin-Taken opened this issue Sep 23, 2024 · 0 comments

Comments

@Blue-Robin-Taken
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant