Search found 37 matches

by eradicatore
Fri Nov 17, 2017 8:31 pm
Forum: ESP8266 boards
Topic: Want to upload a file to slack (files.upload api)
Replies: 1
Views: 852

Want to upload a file to slack (files.upload api)

Hi, So in normal python, I'm able to upload a file just fine to slack. here is the code: my_file = { 'file' : ('/tmp/myfile.pdf', open('/tmp/myfile.pdf', 'rb'), 'pdf') } payload={ "filename":"myfile.pdf", "token":token, "channels":['#random'], } r = requests.post("https://slack.com/api/files.upload"...
by eradicatore
Thu Nov 16, 2017 8:21 pm
Forum: ESP8266 boards
Topic: OSError: scan failed
Replies: 6
Views: 1131

Re: OSError: scan failed

I still can't get the try/except to work around this failure when there are no wifi scan results. Does anyone else see this failure if there are zero ap's visible when you try to scan? Why would code like this not work? try: scan_results = wifi.scan() except: ## for some odd reason OSERROR here mean...
by eradicatore
Tue Oct 03, 2017 7:59 pm
Forum: ESP8266 boards
Topic: OSError: scan failed
Replies: 6
Views: 1131

Re: OSError: scan failed

Hi, Were you able to confirm this happens if the scan results in no networks found? I was hitting OS error on scans in one location last night very repeatedly, so I would assume you're right. But I just expected the documentation to also mention this pretty interesting way of reporting nothing found...
by eradicatore
Tue Jul 25, 2017 2:06 am
Forum: Programs, Libraries and Tools
Topic: urlencode
Replies: 3
Views: 3331

Re: urlencode

Hi,
Sorry, dumb question. How/what do you import here? I tried "import urllib" which works but then help(urllib) shows no methods?
by eradicatore
Thu Jul 20, 2017 2:17 pm
Forum: ESP8266 boards
Topic: Credentials sticking around?
Replies: 7
Views: 1516

Re: Credentials sticking around?

Does the "erase_flash" command in the nodemcu esp8266 "getting started" instructions erase the esp8266's flash or just the node MCU? Does that wipe these last 5 or 6 credentials?
by eradicatore
Thu Jul 20, 2017 11:42 am
Forum: ESP8266 boards
Topic: Credentials sticking around?
Replies: 7
Views: 1516

Re: Credentials sticking around?

Thanks for the reply. Yea, I guess I sort of expected that, and of course most of the time we want that! Is there a "factory reset" type of operation for esp8266? I will go look on google. Anyway, what I have here is working for me to reset. Thanks again! I can't say enough about how much I love uPy...
by eradicatore
Thu Jul 20, 2017 3:02 am
Forum: ESP8266 boards
Topic: Credentials sticking around?
Replies: 7
Views: 1516

Re: Credentials sticking around?

Ok, so I may have worked around it with this code snipped. Before I added the active false and active true calls right before the last while loop, it would sit in the while loop even though I had set the ssid/pass to blank strings. But seems maybe after you do that take it down and back up and it wi...
by eradicatore
Thu Jul 20, 2017 1:50 am
Forum: ESP8266 boards
Topic: Credentials sticking around?
Replies: 7
Views: 1516

Credentials sticking around?

Hi, I have a sort of weird question. So I am using a file "creds" on the nodemcu to store my wifi ssid and password. I have a case where I do os.remove() of that file on boot up if a button is pressed down, and I see that the file does get removed, but it also seems that then the wifi connection/cre...
by eradicatore
Fri Jul 07, 2017 9:05 pm
Forum: ESP8266 boards
Topic: uPyLoader - simple file transfer and communication
Replies: 51
Views: 17264

Re: uPyLoader - simple file transfer and communication

So what is your version number of Python? You mentioned using python3, but oddly from this site it seems that JSONDecodeError should exist for python three: https://www.peterbe.com/plog/jsondecodeerror-in-requests.get.json-python-2-and-3 Let me raise the issue on github for uPyLoader and discuss the...
by eradicatore
Fri Jul 07, 2017 5:30 pm
Forum: ESP8266 boards
Topic: uPyLoader - simple file transfer and communication
Replies: 51
Views: 17264

Re: uPyLoader - simple file transfer and communication

Well I'm remote on my phone so can't test but if you want try to do this:

sudo pip install simplejson

And then change that import to simplejson:

from simplejson import JSONDecodeError