question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Import files to script

See original GitHub issue

How 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} . screen shot 2017-08-21 at 23 43 25

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
Chris7commented, Dec 21, 2017

The python zip idea is interesting. I’ll look into what that may entail.

1reaction
SSchottcommented, Aug 25, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found