Replit does not like the module loader i use

replit does not like the module loader i use

i created my own module loader that parses files from the json file at:
and it works, and works really well for loading packages…
but at the end, a stream of packages were not found:

[ baS ] FINISH aiocometd None
[ baS ] FINISH tortoise-orm None
[ baS ] FINISH smtpapi None
[ baS ] FINISH y-py None
[ baS ] FINISH pyobjc-framework-calendarstore None
[ baS ] FINISH moment None
[ baS ] FINISH amazoncaptcha None
[ baS ] FINISH ypy-websocket None
[ baS ] FINISH pyscss None
[ baS ] FINISH jose None
[ baS ] FINISH xlrd3 None
[ baS ] FINISH pykube-ng None

this goes on for i imagine a thousand or so packages, but just at the bottom
the None is from importlib checking the module’s spec. it means that it couldnt even locate a package named that.
and yes, i do convert -'s to _'s

Hey @jpg!

Could you send me a link to a Repl that runs into this issue so we can take a look?

Pardon the wait, wasn’t paying attention to Ask. was gonna be a different project, but didnt work out so well

it also gets a lot faster after the first maybe 200 packages

I’m not sure why this is working. Is there a reason why you are using a custom loader instead of the package manager we natively support: poetry (or the Packages tab in the sidebar)?

it was for a seperate project where i didnt want to type import and 100 packages, instead code do it 4 me

You should be able to utilize the pyproject.toml that is included along with the poetry CLI in our Python Repls. You can either add the packages to the .toml file or run poetry add <…your packages> like so: poetry add package1 package2 package3 ....

yea but thats manual. this does it on its own.

1 Like

Is it maybe because those modules are not even installed on your repl?

1 Like