Closed mhsmith closed 1 year ago
Hi, what's the status of this issue? i need it exactly for the PyTorch hubconf.py files part 😅
We'll fix this issue in the next version of Chaquopy. Meanwhile, you can extract your hubconf.py file using the technique shown at https://github.com/chaquo/chaquopy/issues/501#issuecomment-845265141.
what if we want to extract only 1 file? the old way seems doesn't work anymore in the latest version
You should still be able to use the technique linked above to extract as many or as few files as you want. Or you can use extractPackages
to extract an entire directory of Python files.
If something doesn't work, please give details.
this is the error if i update the version to 14.0.2. it doesn't happen in 13.0.0
com.chaquo.python.PyException: AttributeError: 'AssetFinder' object has no attribute 'extract_packages'
Please post the full stack trace, and the relevant sections of your code.
Actually, this is probably related to #820. Make sure you're using the __loader__
of the top-level package. I've updated https://github.com/chaquo/chaquopy/issues/501#issuecomment-845265141 to explain this.
See discussion at https://github.com/beeware/toga/pull/1687#discussion_r1028474660, including the need to preserve .py files.
Things that this would be useful for:
Only
extract_dir
needs to check the setting: the actual import mechanism probably doesn't need to change.