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

Error upon attempt to import the module using 'import gd' #210

Open
yarnlet opened this issue Oct 21, 2024 · 1 comment
Open

Error upon attempt to import the module using 'import gd' #210

yarnlet opened this issue Oct 21, 2024 · 1 comment

Comments

@yarnlet
Copy link

yarnlet commented Oct 21, 2024

Error description and replication

  1. Built and installed module from git source using provided commands
  2. Created a new file and imported GD with some test code
  3. Ran the file

Code

import gd

print(gd.client.get_user(account_id=16)) # get user by account id

File run and error log:

PS C:\Users\Zoe\Desktop\REDACTED> & C:/Users/Zoe/AppData/Local/Programs/Python/Python312/python.exe c:/Users/Zoe/Desktop/REDACTED/api/test.py
Traceback (most recent call last):
  File "c:\Users\Zoe\Desktop\REDACTED\api\test.py", line 1, in <module>
    import gd
  File "C:\Users\Zoe\AppData\Local\Programs\Python\Python312\Lib\site-packages\gd\__init__.py", line 11, in <module>
    from gd import (
  File "C:\Users\Zoe\AppData\Local\Programs\Python\Python312\Lib\site-packages\gd\api\__init__.py", line 1, in <module>
    from gd.api.artist import ArtistAPI
  File "C:\Users\Zoe\AppData\Local\Programs\Python\Python312\Lib\site-packages\gd\api\artist.py", line 11, in <module>
    from gd.schema import ArtistAPISchema
  File "C:\Users\Zoe\AppData\Local\Programs\Python\Python312\Lib\site-packages\gd\schema.py", line 39, in <module>
    artist = load_module("artist")
             ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Zoe\AppData\Local\Programs\Python\Python312\Lib\site-packages\gd\schema.py", line 32, in load_module
    raise FileNotFoundError(path_string)
FileNotFoundError: C:/Users/Zoe/AppData/Local/Programs/Python/Python312/Lib/site-packages/gd/submodules/schema/gd/schema/artist.capnp

Comments

When the module is installed, no directory called submodules/schema/gd/schema at Python/Python312/Lib/site-packages/gd is created. If the directory is created manually and the schema from gd.schema is cloned into the directory, there are still missing schemas; comment.capnp, demonInfo.capnp, and password.capnp. I looked over https://github.com/gd-programming/gd.schema and the schema appears to not include the aforementioned files. I don't know if this is a version mismatch, but this is an issue that is problematic for many different users using this package as well (as seen in the issues tab).

@yarnlet
Copy link
Author

yarnlet commented Oct 21, 2024

^^ I'm aware this code doesn't work but that's not where the interpreter fails

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