Closed kazuser closed 1 year ago
Fix:
Hmmm... I really think you didn't fix it right. You have tried to load a module that doesn't exist and then you only created a fake module using the TPythonModule component. You certainly will be caught by other erros while loading symbols from that module... I'd suggest you to re-check your Lingua version or else if you have defined the right module name.
That package itself is called lingua-language-detector on PyPI, but available as lingua to be imported. I presume you're not importing it using the right name. Try to import it as lingua where you're using lingua-language-detector.
Here's how you can import your package: https://github.com/Embarcadero/Lightweight-Python-Wrappers/blob/37035df09e5775ac107b3dbba6f52552d2281614/src/PyCommon.pas#L137
Thanks a lot, lmbelo!
You're right, it works!
😊
I think I need your help again: I created a "Lingua" component based on https://pypi.org/project/lingua-language-detector/ — and it works fine (languages are detected correctly) but the very first launch always fails:
How can it be fixed? 🥲
p.s. Lingua.zip Project1.zip p4d.zip