Closed Vocaloid2048 closed 1 year ago
Thx if can give me a helping hands ~ That's a really great project, big thx again !
awesome repo, i was thinking of making a discord bot as well!
seems like this error comes from the fact that typing.List
only accepts homogenous data types?
did this change locally List[Union[Material, int]]
and the error went away, but im uncertain how it'll affect the code since another error pops up after that:
Exception has occurred: RuntimeError
no validator found for <class '__main__.BonusAbility'>, see `arbitrary_types_allowed` in Config
File "dir\hsr-data\datamodels\trace.py", line 61, in <module>
UnlockPrerequisite.update_forward_refs()
RuntimeError: no validator found for <class '__main__.BonusAbility'>, see `arbitrary_types_allowed` in Config
Oh, sorry for the error. As the main branch is being used for development, so it might throw errors. For ease of use, I have pushed a recent commit to data branch for those who just wants to use raw data
. You just need to run raw_data.py
there.
The error you are getting is because of a incomplete file that is being worked on. Sorry you came across that.
awesome repo, i was thinking of making a discord bot as well!
seems like this error comes from the fact that
typing.List
only accepts homogenous data types?did this change locally
List[Union[Material, int]]
and the error went away, but im uncertain how it'll affect the code since another error pops up after that:Exception has occurred: RuntimeError no validator found for <class '__main__.BonusAbility'>, see `arbitrary_types_allowed` in Config File "dir\hsr-data\datamodels\trace.py", line 61, in <module> UnlockPrerequisite.update_forward_refs() RuntimeError: no validator found for <class '__main__.BonusAbility'>, see `arbitrary_types_allowed` in Config
hehe. that's my fault. master
branch is very unstable. but yea, you can try running the raw_data.py
from data
branch of this repo and it works fine as mentioned above.
we'll keep this issue open until its fixed in master branch though, so don't yet close it
raw_data.py
now works in master
closing the issue.
PS C:\Users\Vocaloid2048\Desktop\hsr-data-master> & C:/Users/Vocaloid2048/AppData/Local/Programs/Python/Python310/python.exe c:/Users/Vocaloid2048/Desktop/hsr-data-master/raw_data.py Traceback (most recent call last): File "c:\Users\Vocaloid2048\Desktop\hsr-data-master\raw_data.py", line 1, in
from main import SRSClient
File "c:\Users\Vocaloid2048\Desktop\hsr-data-master\main.py", line 2, in
from datamodels.searchItem import
File "c:\Users\Vocaloid2048\Desktop\hsr-data-master\datamodels__init__.py", line 1, in
from . import chara, trace
File "c:\Users\Vocaloid2048\Desktop\hsr-data-master\datamodels\chara.py", line 4, in
from . import trace
File "c:\Users\Vocaloid2048\Desktop\hsr-data-master\datamodels\trace.py", line 21, in
class BonusAbility:
File "c:\Users\Vocaloid2048\Desktop\hsr-data-master\datamodels\trace.py", line 29, in BonusAbility
activation_mats: List[(Material, int)]
File "C:\Users\Vocaloid2048\AppData\Local\Programs\Python\Python310\lib\typing.py", line 312, in inner
return func( args, **kwds)
File "C:\Users\Vocaloid2048\AppData\Local\Programs\Python\Python310\lib\typing.py", line 1144, in getitem
_check_generic(self, params, self._nparams)
File "C:\Users\Vocaloid2048\AppData\Local\Programs\Python\Python310\lib\site-packages\typing_extensions.py", line 106, in _check_generic
raise TypeError(f"Too {'many' if alen > elen else 'few'} parameters for {cls};"
TypeError: Too many parameters for typing.List; actual 2, expected 1