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

Odd issues #21

Closed
BusesCanFly opened this issue Feb 15, 2017 · 7 comments
Closed

Odd issues #21

BusesCanFly opened this issue Feb 15, 2017 · 7 comments
Labels
help wanted Requesting support

Comments

@BusesCanFly
Copy link

BusesCanFly commented Feb 15, 2017

I'm getting an error when trying to upload to a nodemcu. I am brand-new to the nodemcu, and esp, which means there is a lot of room for error. Help and guidance would be much appreciated!

java.io.IOException: Cannot run program "python.exe": CreateProcess error=2, The system cannot find the file specified
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:26)
	at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:129)
	at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:206)
	at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78)
	at processing.app.SketchController.upload(SketchController.java:707)
	at processing.app.SketchController.exportApplet(SketchController.java:680)
	at processing.app.Editor$DefaultExportHandler.run(Editor.java:2176)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
	at java.lang.ProcessImpl.start(ProcessImpl.java:137)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
	... 8 more
An error occurred while uploading the sketch
@spacehuhn
Copy link
Collaborator

Java isn't able to find python.exe. Check if you have python installed correctly.

@BusesCanFly
Copy link
Author

BusesCanFly commented Feb 18, 2017

Ah, I should've seen that coming. I'm now running into this error, and my experience with large arduino programs, and the esp8266 is brand-new, so I apologize in advance for potentially dumb questions.
Does anyone understand why this is happening?

Traceback (most recent call last):
  File "C:\Users\_\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.0.0/tools/espota.py", line 302, in <module>
    sys.exit(main(sys.argv))
  File "C:\Users\_\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.0.0/tools/espota.py", line 297, in main
    return serve(options.esp_ip, options.esp_port, options.auth, options.image, command)
  File "C:\Users\_\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.0.0/tools/espota.py", line 91, in serve
    sent = sock2.sendto(message, remote_address)
TypeError: a bytes-like object is required, not 'str'
TypeError: a bytes-like object is required, not 'str'

@andrbmgi
Copy link
Contributor

Looks like you set it to over the air (ota) upload. In Arduino under Tools, set it to "Upload Using: serial".

@itsashishupadhyay
Copy link

helped by --> https://github.com/per1234?tab=repositories
You need to add the folder that contains python.exe to your path:

Determine the path to the folder that contains python.exe. You can use Windows File Explorer for this.
In the search bar, type "System (Control Panel)"
Click on the matching search result
Click the "Advanced system settings" link.
Click the "Environment Variables" button.
In the section System Variables, find the PATH environment variable and select it.
Click the "Edit" button.
Click on the first blank line
Type the path to the folder that contains python.exe.
Click "OK"
Click "OK"
Click "OK"

@bigFin
Copy link

bigFin commented Apr 23, 2018

@itsashishupadhyay This did not work for me.

@itsashishupadhyay
Copy link

@bigFin try restarting the IDE, then uploading via USB and then uploading via OTA ( Do recheck you have added the path to python.exe in Environment Variables (Search Advanced system settings in taskbar---->Environment Variables---------->Path (click edit) add folder path containing python.exe ) )

@bigFin
Copy link

bigFin commented Apr 25, 2018

@itsashishupadhyay manually adding the variable did not work. I reinstalled Python 2.7 and selected the option to install the environmental variable. This worked.

@spacehuhn spacehuhn added the help wanted Requesting support label Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Requesting support
Projects
None yet
Development

No branches or pull requests

5 participants