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

File uploading is stuck #77

Open
oryair1 opened this issue Dec 13, 2018 · 18 comments
Open

File uploading is stuck #77

oryair1 opened this issue Dec 13, 2018 · 18 comments

Comments

@oryair1
Copy link

oryair1 commented Dec 13, 2018

I followed every step in the README file, though when I press run to upload the python files I get:
"Connecting to COM4
Uploading files: 0% (0/1)
C:\Projects\MicroPython\ESP32\main.py -> main.py"
This just stays like this forever.
Please tell me what to do.

@vlasovskikh
Copy link
Contributor

Uploading is done via a Python script microupload.py located in the plugin installation directory. See this doc for the platform-specific location of the directory with installed plugins. In order to debug this problem you can try running /path/to/your/project/virtualenv/bin/python microupload.py with the necessary parameters from the system command line and see what it does. Feel free to copy this script into your project directory so you can modify it / debug it within PyCharm.

@oryair1
Copy link
Author

oryair1 commented Dec 13, 2018

OK, thanks a lot! I will try to do that and be back with results.
I have one more question - what is the python version of micropython?

@oryair1
Copy link
Author

oryair1 commented Dec 13, 2018

@vlasovskikh
I debuuged the microupload.py script and I noticed the this line is blocking the script - "files.put(remote_path, fd.read())"
Can you tell why?

@jeffkarney
Copy link

Is your REPL terminal open when you are trying to upload? I noticed that if it is open, uploading will get stuck like you describe.

@oryair1
Copy link
Author

oryair1 commented Dec 16, 2018

Unfortunately no, a REPL terminal was not open at the time of upload. Can you think of any thing else which will cause "files.put(remote_path, fd.read())" to block the script?

@lpbas
Copy link

lpbas commented Feb 4, 2019

I've also faced this issue, with one ESP32 board, which other tools were able to connect and flash files to. However, trying with a different ESP32 board, I was able to get the tool to flash the files sucessfully. I'll post here if I do more digging on the "bad board"

@SimahoJr
Copy link

did you find the solution on this issue

@lpbas
Copy link

lpbas commented Jul 15, 2019

For me, I ended up using a different board and the upload is working fine ever since... Did not have the time to dig deeper into the issue.

@SimahoJr
Copy link

SimahoJr commented Jul 15, 2019 via email

@vlasovskikh
Copy link
Contributor

Closing this issue as obsolete. If the problem is still relevant to you, feel free to comment or open another issue.

@quaintdev
Copy link

I am facing the exact same issue. The upload is stuck forever.
@SimahoJr could you possibly share the script as a gist?

@quaintdev
Copy link

quaintdev commented Feb 4, 2021

Turns out adding a delay of 3 seconds like below in microupload.py solves the issue. While debugging step by step I found out that there was no issue at all. It works if we slow it down a bit. 😃

            time.sleep(3) 
            files.put(remote_path, fd.read())

@frederic-bonjour
Copy link

Hi,
Adding time.sleep(1) in script microupload.py, as mentioned above, worked for me!
Thanks a lot!

@vlasovskikh
Copy link
Contributor

There is #142 that proposes one way to fix it. I've left my review comments there suggesting yet another approach.

@AnAvgGuy
Copy link

AnAvgGuy commented Jan 8, 2022

There is #142 that proposes one way to fix it. I've left my review comments there suggesting yet another approach.

I have the same issue now, Ive tried thay but the line I get pointed out debugging is "raise DocopExit()", any idea what my problem might be?

@Amundw99
Copy link

Amundw99 commented Sep 6, 2023

I still have this one ....
"Connecting to COM4
Uploading files: 0% (0/1)
C:\Projects\MicroPython\ESP32\main.py -> main.py"

No file uploaded. I have tried different delay times in microupload.py, but nothing helps. I also try the boot button while Run flash, but no positive result.
Please advice ....

@marcosdantas1897
Copy link

Estou enfrentado este mesmo erro ao tentar usar o NodeMCU ESP8266 com Micropython no Pycharm, consigo ate fazer upload do código uma vez, mas se for tentar novamente a execução simplesmente não finaliza me deixando apenas com isso na tela:
Connecting to COM3
Uploading files: 0% (0/1)
C:\Users\Marcos\PycharmProjects\pythonProject2\main.py -> main.py

Se alguém tiver alguma sugestão agradeço.
Segue a imagem da minha tela de codificação,
{CC87FE1E-7617-4B6D-8B17-902F22B7FB7D} png

@SimahoJr
Copy link

SimahoJr commented Nov 5, 2023

Estou enfrentado este mesmo erro ao tentar usar o NodeMCU ESP8266 com Micropython no Pycharm, consigo ate fazer upload do código uma vez, mas se for tentar novamente a execução simplesmente não finaliza me deixando apenas com isso na tela: Connecting to COM3 Uploading files: 0% (0/1) C:\Users\Marcos\PycharmProjects\pythonProject2\main.py -> main.py

Se alguém tiver alguma sugestão agradeço. Segue a imagem da minha tela de codificação, {CC87FE1E-7617-4B6D-8B17-902F22B7FB7D} png

Try:

  1. Press the boot button while uploading
  2. Make sure you have the right firmware (micropython)

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

10 participants