Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

script syntax error bad argument #1 to 'writ #103

Closed
teckel12 opened this issue Apr 28, 2018 · 7 comments
Closed

script syntax error bad argument #1 to 'writ #103

teckel12 opened this issue Apr 28, 2018 · 7 comments
Assignees
Milestone

Comments

@teckel12
Copy link
Owner

teckel12 commented Apr 28, 2018

Issue initiated by @shaiss

All I see is "script syntax error bad argument #1 to 'writ"

@teckel12
Copy link
Owner Author

Based on the error that you provided, it greatly isolates what the problem could be. It seems that it's trying to write to the config.dat file but it can't. My guess is that's because you didn't copy over the iNav folder that's included in the TELEMETRY folder.

Both the iNav.lua and the iNav folder need to be moved to the TELEMETRY folder on your transmitter's SD card. See the INAV Lua Telemetry Screen Setup for more details (specifically step 2). I'll clarify step 2 to state that BOTH the iNav.lua file and iNav folder must be copied. I'll also look into creating an error if this folder doesn't exist (or at least not causing the script to crash).

Let me know what happens.

@teckel12
Copy link
Owner Author

I can confirm that if the iNav folder doesn't exist the script will indeed throw this error. This will be addressed in v1.2.5

@teckel12 teckel12 added this to the 1.2.5 milestone Apr 28, 2018
@teckel12 teckel12 self-assigned this Apr 28, 2018
@teckel12
Copy link
Owner Author

@shaiss I've created a more graceful error message if the iNav folder doesn't exist. You can download this development version here.

But, you'll also need to move the iNav folder to your transmitter's SD card as well to get past the more graceful error message. The iNav folder contains the sound files that Lua Telemetry uses as well as where it creates a config file used for your custom configuration. The error happened because it previously assumed the iNav folder existed and tried to create your config file the first time you ran Lua Telemetry. With 1.2.5 it now first checks to see if it can create the file before writing to it. If it can't create the config file, it throws a graceful error telling you what's up.

@teckel12
Copy link
Owner Author

Resolved with PR #106 v1.2.5 now available for download

@shaiss
Copy link

shaiss commented Apr 29, 2018

I'll give it a try tomorrow and report back! Thx for addressing!

@teckel12
Copy link
Owner Author

@shaiss If you could, just update the iNav.lua script first, which should give you a more specific message (and not crash). The upgrade to 1.2.5 won't really fix the problem, but it at least will tell you what's wrong. Then, move over the iNav folder from to the TELEMETRY folder, which is the real solution to the issue. But, any feedback would be appreciated.

@shaiss
Copy link

shaiss commented Apr 30, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants