Error with dependency trying to open a file
See original GitHub issueChaquopy version
com.chaquo.python:gradle:9.0.0
Devices or emulators where the issue happens
Android emulator version 30.4.5.0 emulating Galaxy Nexus API 30
Hello,
I am working on a mobile app integrating the problog interpreter, which is written in python.
I included problog in my dependencies, and it generally works fine for basic operations.
However, I get an exception whenever I try to use one of problog’s modules written in python: the problog engine doesn’t find the required file.
here’s the exception:
2021-05-19 18:24:42.070 11109-11131/my.app.test E/TestRunner: com.chaquo.python.PyException: ProbLogError: [Errno 2] No such file or directory: '/data/user/0/my.app.test/files/chaquopy/AssetFinder/requirements/problog/library/assert'.
at <python>.problog.program.__init__(program.py:324)
at <python>.problog.clausedb.consult(clausedb.py:716)
at <python>.problog.clausedb.use_module(clausedb.py:763)
at <python>.problog.engine_builtin._use_module(engine_builtin.py:1707)
at <python>.problog.engine_stack.__call__(engine_stack.py:2500)
at <python>.problog.engine_stack.__call__(engine_stack.py:2463)
at <python>.problog.engine_stack.eval_default(engine_stack.py:1201)
at <python>.problog.engine_stack.eval_builtin(engine_stack.py:1197)
at <python>.problog.engine_stack.eval(engine_stack.py:212)
at <python>.problog.engine_stack.eval_call(engine_stack.py:1077)
at <python>.problog.engine_stack.eval(engine_stack.py:212)
at <python>.problog.engine_stack.eval_clause(engine_stack.py:1134)
at <python>.problog.engine_stack.eval(engine_stack.py:212)
at <python>.problog.engine_stack.execute(engine_stack.py:590)
at <python>.problog.engine._process_directives(engine.py:228)
at <python>.problog.engine.prepare(engine.py:200)
...
No python file from problog’s library can be found at that path, here’s a comparison between what can be found in a virtualenv and on the emulator filesystem:
I have read the often-cited issue 144, but my problem here is slightly different: I’m not trying to read a file from my code, it is an installed dependency (problog) which is trying to load a python file from its own assets.
What can I do? Where did those python files get moved to?
Thank you.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Top GitHub Comments
Just follow the same instructions, but replace the package name and filename with the one you want.
Hi, can you elaborate more how to extract .py file? i have my own .py file and i need to have it in AssetFinder folder