30350n / inventree_part_import

CLI to import parts from suppliers like DigiKey, LCSC, Mouser, etc. to InvenTree
MIT License
24 stars 8 forks source link

ModuleNotFoundError: No module named 'inventree_part_import.error_helper' #51

Closed randrej closed 1 month ago

randrej commented 1 month ago

You're vendoring in error_helper as a submodule, but it's not getting packaged and pushed to PyPI, hence this whole package doesn't run. Since you already packaged it on PyPI, just add it to the reqs.

For the AUR package I fixed it by just packaging and find ... -exec sed, but the fix should be here.

30350n commented 1 month ago

Are you sure about that? It is present in the inventree_part_import-1.6.tar.gz from https://pypi.org/project/inventree-part-import/#files.

The workflow I'm using is also configured to checkout submodules before building via hatch, so I don't see why it wouldn't be present in the wheel either: https://github.com/30350n/inventree_part_import/blob/22ff74053531fb4a7b4c8f5e01ede160f6927dc4/.github/workflows/publish.yaml#L12-L25

30350n commented 1 month ago

Ah, TIL wheels are also just .zip files (could have expected that I guess ^^). And yeah error_helper is also present in the wheel.

30350n commented 1 month ago

Seems like this is probably just a problem with your PKGBUILD for the -git version. You should probably be using hatch there and also force checking out all submodules (not sure how that'll work exactly, never messed with Arch packages before).

randrej commented 1 month ago

You seem to be correct, I'm pulling the source package (https://files.pythonhosted.org/packages/source/i/inventree_part_import/inventree_part_import-1.6.tar.gz as per the Python packaging guidelines) and now I can't seem to replicate the issue, the folder is there; however, somehow the first time around the error_helper dir didn't end up in the package. Strange.

randrej commented 1 month ago

Seems like this is probably just a problem with your PKGBUILD for the -git version. You should probably be using hatch there and also force checking out all submodules (not sure how that'll work exactly, never messed with Arch packages before).

Yeah, this is true, there's a roundabout way to download submodules, but I didn't do it; I will, now.

randrej commented 1 month ago

Yeah, false alarm; I can't seem to replicate it now. Will undo the find/sed thing.

randrej commented 1 month ago

I was looking at the wrong package, the -git one.