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

ModuleNotFoundError: No module named 'wraps.primitives' (when installed in a fresh virtual environment.) #212

Open
rgc-exists opened this issue Oct 27, 2024 · 3 comments

Comments

@rgc-exists
Copy link

I've been trying to get the latest version of gd.py working on my device literally all day today.

I'm not the greatest with command-line stuff so I'm probably missing something painfully obvious, but I keep running into errors no matter what I do.

I tried creating a new, fresh virtual environment and running pip install gd.py in there, and it FINALLY installed the thing, but when I run the script it gives me this error:

Traceback (most recent call last):
  File "c:\Users\rando\OneDrive\Documents\Check_GD_Icons\download_data.py", line 11, in <module>
    import gd
  File "C:\Users\rando\OneDrive\Documents\Check_GD_Icons\.venv\Lib\site-packages\gd\__init__.py", line 11, in <module>
    from gd import (
  File "C:\Users\rando\OneDrive\Documents\Check_GD_Icons\.venv\Lib\site-packages\gd\api\__init__.py", line 1, in <module>
    from gd.api.color_channels import (
  File "C:\Users\rando\OneDrive\Documents\Check_GD_Icons\.venv\Lib\site-packages\gd\api\color_channels.py", line 8, in <module>
    from iters.iters import iter
  File "C:\Users\rando\OneDrive\Documents\Check_GD_Icons\.venv\Lib\site-packages\iters\__init__.py", line 16, in <module>
    from iters.async_iters import (
  File "C:\Users\rando\OneDrive\Documents\Check_GD_Icons\.venv\Lib\site-packages\iters\async_iters.py", line 64, in <module>
    from wraps.primitives.option import Option, Some
ModuleNotFoundError: No module named 'wraps.primitives'

I looked into it and saw that you apparently made your own custom library called "wraps", but I don't see anything related to "primitives" ANYWHERE in that repository.
I've tried pip installing wraps both from pypi and from your github page. No luck.

Does anyone have any idea how to fix this?

@rgc-exists
Copy link
Author

Update: I ended up screwing around with installing old versions of gd.py's dependencies (and the dependencies of the dependencies) and ended up getting it ALMOST working, but apparently the 2.2 version of gd.py isn't on pip yet, so I need to build from source. So I tried building it from source as instructed in the ReadMe file, and now I get the error from #210.

Traceback (most recent call last):
  File "c:\Users\rando\OneDrive\Documents\Check_GD_Icons\download_data.py", line 11, in <module>
    import gd
  File "C:\Users\rando\OneDrive\Documents\Check_GD_Icons\.venv\Lib\site-packages\gd\__init__.py", line 11, in <module>
    from gd import (
  File "C:\Users\rando\OneDrive\Documents\Check_GD_Icons\.venv\Lib\site-packages\gd\api\__init__.py", line 1, in <module>
    from gd.api.artist import ArtistAPI
  File "C:\Users\rando\OneDrive\Documents\Check_GD_Icons\.venv\Lib\site-packages\gd\api\artist.py", line 11, in <module>
    from gd.schema import ArtistAPISchema
  File "C:\Users\rando\OneDrive\Documents\Check_GD_Icons\.venv\Lib\site-packages\gd\schema.py", line 39, in <module>
    artist = load_module("artist")
             ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\rando\OneDrive\Documents\Check_GD_Icons\.venv\Lib\site-packages\gd\schema.py", line 32, in load_module
    raise FileNotFoundError(path_string)
FileNotFoundError: C:/Users/rando/OneDrive/Documents/Check_GD_Icons/.venv/Lib/site-packages/gd/submodules/schema/gd/schema/artist.capnp

Please help.

@rgc-exists
Copy link
Author

UPDATE 2: I got it working in a SUPER hacky way, but I'm not going to close this issue since it's still not working without me directly modifying my local copy of the library.

Basically, I had to install some specific older versions of certain libraries, and then I had to go into all the places that the wraps module had moved around for no reason in 0.14.1 and correct them.

Seriously though, the release for that update on the wraps repository says "no major changes", but you literally rearranged half of the codebase. This is completely confusing to me.

Anyways, nonetheless, thank you for creating this incredibly useful library. It truly is amazing and I hope this issue is fixed (or you tell me what I was blatantly doing wrong) soon.

@DelofJ
Copy link

DelofJ commented Nov 3, 2024

I've opened the following issue on the iters repository since this issue is directly related to it nekitdev/iters#67

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

2 participants