Skip to content

Importing pycardano throws OSError: could not get source code #2704

Answered by freakboy3742
l-o-u-i-s-g asked this question in Q&A
Discussion options

You must be logged in to vote

There's a lot of differences between Android and a desktop Linux - including, but not limited to, paths.

I have no idea what pycardarno is, so very difficult to comment on what exactly is going wrong here, beyond the detail that is already in the message - that something in the cardarno library is trying to access the source code of the module at runtime, and is doing that in a way that isn't compatible with deployment on Android.

This might be due to how code is deployed on Android. In a desktop deployment, an installed package is a directory of files on disk; however, on Android, the code is contained in the APK file, which is effectively a zip. When running on Android, a custom loader …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@l-o-u-i-s-g
Comment options

Answer selected by l-o-u-i-s-g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants