Module "ImportError" at specific url path
See original GitHub issueWhen I run window.runCode("import smartpy")
at cryptocodeschool root url path it works perfectly fine.
But, when I try running the same command at a specific URL path directly ( for example https://develop.cryptocodeschool.in/tezos/lesson/module-01/chapter-15 ) it throws an error :
"Traceback (most recent call last):
module __main__ line 212, in run
import smartpy
ImportError: 'No module named smartpy'"
I have initialized brython using brython({ debug: 1, indexedDB: false });
command.
I have also tried using brython({ debug: 1, pythonpath: '.', hint: 'py' });
command for initialization. In this case it throws this error:
Repo link: https://github.com/buidl-labs/crypto-code-school-inside-tezos
The codebase is based on Gatsby. I don’t if it’s a gatsby thing or maybe I am initializing the Brython incorrectly cause it seems to work fine at the root URL but if I go to a specific URL directly it throws an error in that case.
All the related files are in the static folder and Brython is being initialized inside the gatsby-browser.js
file.
I have been stuck at it for a while now and any help would be really help 🙏…
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
Cool ! I close the issue then.
Yes, it’s working now. Thanks.