G-eb / pingr

70 stars 45 forks source link

(fixed) no longer works #8

Closed faulty-teen closed 1 year ago

faulty-teen commented 1 year ago

im getting errors when running spam.py this is the only one that is obvious to me bc im not great at python errors: ValueError: mutable default <class 'discord.utils._MissingSentinel'> for field name is not allowed: use default_factory

faulty-teen commented 1 year ago

here is all of them: File "C:\Users\name\Downloads\pingr-main\pingr-main\spam.py", line 2, in <module> from discord.ext import commands File "C:\Users\name\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\ext\commands\__init__.py", line 18, in <module> from .flags import * File "C:\Users\name\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\ext\commands\flags.py", line 71, in <module> @dataclass ^^^^^^^^^ File "C:\Users\name\AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 1221, in dataclass return wrap(cls) ^^^^^^^^^ File "C:\Users\name\AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 1211, in wrap return _process_class(cls, init, repr, eq, order, unsafe_hash, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\name\AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 959, in _process_class cls_fields.append(_get_field(cls, name, type, kw_only)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\name\AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 816, in _get_field raise ValueError(f'mutable default {type(f.default)} for field ' ValueError: mutable default <class 'discord.utils._MissingSentinel'> for field name is not allowed: use default_factory

G-eb commented 1 year ago

Do the following in the console:

This will update you to the newest py-cord version which will fix this problem. (requirements.txt has also been updated)