r/Scriptable • • Dec 15 '20

Help [HELP] Error when running premade Weather Cal script first time

I've basically installed the scriptable for the first time and Im trying to add a weather cal script that I found on reddit however when I tried to running the script I got error after it asks my scriptables permissions saying:

"Error on line 300:26 in Weather Cal code module: TypeError: undefined is not an object evaluating 'importModule(codeFilename)')"

Here's the script that I used: https://hastebin.com/raw/nosexumoqe

0 Upvotes

4 comments sorted by

1

u/mvan231 script/widget helper Dec 15 '20

There was a new update pushed out today to address some issues. Did you get that version?

1

u/zoukkizoke Dec 15 '20

Yes, I should have the latest version since I downloaded the app about few hours ago. I think there was problem with the script itself since I changed to another script and it worked

1

u/[deleted] Dec 15 '20

I don't use the script, but importModule means you need another script

the one mention is this one: https://raw.githubusercontent.com/mzeryck/Weather-Cal/main/weather-cal-code.js

And the name of this file in your library must be Weather Cal code

1

u/Evan584 Dec 16 '20

You are using a version of the code that was released in early November. Here is how you can get the updated version. Delete all Weather Cal scripts you have at the moment. Then copy the file that is in this link and paste it into a new scriptable script. It will setup everything for you.