Import files to script
See original GitHub issueHow can I import my custom files?
I need to use my files inside the script.
print(os.path.dirname(sys.argv[0])) gives me /opt/DO_wooey/media/wooey_scripts, I decided to put my custom files in this directory, but it does not work, the script still gives me this error: OSError: SavedModel file does not exist at: test_build/{saved_model.pbtxt|saved_model.pb} .

Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (8 by maintainers)
Top Results From Across the Web
Importing a Script or Data File on the Scripts Page - STNext
Click My Files, and then select Scripts. · On the Scripts page, click the Import Script button. · In the Import Script pop-up...
Read more >import - JavaScript - MDN Web Docs - Mozilla
In HTML, this is done by adding type="module" to the <script> tag. ... Certain bundlers may permit importing files without extensions; ...
Read more >Importing Scripts using the Files App - Teleprompter for Video
To import a script from Files, tap the + button in the top right corner, and then select Add from Files.
Read more >Example: Import Files Using an Op Script | Junos OS
The op script in this example uses the Junos XML protocol file-get operation to read the contents of a file from a remote...
Read more >How do I include a JavaScript file in another JavaScript file?
import_js() helper (for JavaScript importing within JavaScript code). */ var import_js_imported = []; $.extend(true, { import_js : function(script) { ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The python zip idea is interesting. I’ll look into what that may entail.
Make sure to use absolute paths into your script. In my case I’m using multiple modules and even other programs, and I specified everything relative to the absolute path of the script itself, so that I can copy it anywhere, as long as the relative location of the extra files is maintained.