You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have recently updated to v3.0.0 and those errors are now popping up while trying to instantiate a schema:
Traceback (most recent call last):
File "C:\Users\Redacted\lab-assistant\lab-assistant-env\lib\site-packages\discord\client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "C:\Users\Redacted\lab-assistant\cogs\botmonitor.py", line 45, in on_member_update
guild_data = await self.bot.get_guild_data(guild)
File "C:\Users\Redacted\lab-assistant\internal\botclass.py", line 62, in get_guild_data
from database.Guild import Guild
File "C:\Users\Redacted\lab-assistant\database\Guild.py", line 6, in <module>
from database.Team import Team
File "C:\Users\Redacted\lab-assistant\database\Team.py", line 7, in <module>
class Team(Document):
File "C:\Users\Redacted\lab-assistant\database\Team.py", line 12, in Team
role_id = IntField(required=True, default=0)
File "C:\Users\Redacted\lab-assistant\lab-assistant-env\lib\site-packages\umongo\abstract.py", line 133, in __init__
super().__init__(*args, **kwargs)
File "C:\Users\Redacted\lab-assistant\lab-assistant-env\lib\site-packages\marshmallow\fields.py", line 940, in __init__
super().__init__(**kwargs)
File "C:\Users\Redacted\lab-assistant\lab-assistant-env\lib\site-packages\marshmallow\fields.py", line 889, in __init__
super().__init__(**kwargs)
File "C:\Users\Redacted\lab-assistant\lab-assistant-env\lib\site-packages\marshmallow\fields.py", line 188, in __init__
raise ValueError("'missing' must not be set for required fields.")
ValueError: 'missing' must not be set for required fields.
However, I am never setting 'missing' anywhere. Here's a document registration example:
What's the point of having a default on a required field?
It's so when I create a document I need to initialize some defaults that are always the same and also required for the doc to work without many checks, and since I have multiple sources of insertions, it's better to have those static values set in there. If there's another recommended way to do this, I'm all ears.
I have recently updated to v3.0.0 and those errors are now popping up while trying to instantiate a schema:
However, I am never setting 'missing' anywhere. Here's a document registration example:
Could anyone tell me why this is happening? I use defaults to not create duplicated code on my insertions.
The text was updated successfully, but these errors were encountered: