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

Problems sending encoded strings #5

Open
clixx-io opened this issue Jan 10, 2015 · 5 comments
Open

Problems sending encoded strings #5

clixx-io opened this issue Jan 10, 2015 · 5 comments

Comments

@clixx-io
Copy link

Not able to upload a program with the following line in it:

        _, _, method, path = string.find(request, "([A-Z]+) (.+) HTTP"); 
@dvv
Copy link

dvv commented Jan 22, 2015

local foo = bar[i] as well -- chokes at trailing ]. A space after this char solves.

@marcoskirsch
Copy link

I ran into the same. Seems like this would be a pretty common issue.

After a little bit of debugging it is clear that anything ending with ] would choke since the commands send use double square brackets to send each line as a string literal. Similarly, anything with [[ in it would choke (can't nest [[]] string literals). Also, it appears there's a command length limitation of ~256 on the nodemcu device, so that breaks as well.

I'm not sure these are easy to fix without large changes to luatool.py; but they can certainly be caught by the script which could then return a useful error message. This way the user can trivially workaround the problems instead of being stumped.

@marcoskirsch
Copy link

jloyola has fixed the problems in his branch:

jlloyola@5dfa3ca
jlloyola@305358e

I assume it will get pulled shortly into the main branch.

@marcoskirsch
Copy link

I think this should be closed now?

@dvv
Copy link

dvv commented Feb 13, 2015

Right. Thanks

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

No branches or pull requests

3 participants