-
Notifications
You must be signed in to change notification settings - Fork 301
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
AttributeError: module 'esptool' has no attribute '_main'
at idf5.+ (VSC-958)
#791
Comments
AttributeError: module 'esptool' has no attribute '_main'
at idf5.+AttributeError: module 'esptool' has no attribute '_main'
at idf5.+ (VSC-958)
This seems to be an issue with the virtual environment you are using. Try deleting the virtual environment and install it again. |
Closing this issue due to lack of response from user. Please comment here if you need further assistance. |
I am deleted the entire esp-tools folder and reinstalled it fresh which should have installed a new python environment. I am still getting the error message after reinstalling. |
Could you share the ESP-IDF: Doctor Command Output @Jeff-Conley ? |
---------------------------------------------- ESP-IDF Extension for Visual Studio Code report --------------------------------------------- |
I am able to compile with the compile button. I can also flash using the terminal command |
Hello, @Jeff-Conley
i have reinstall windows and vscode so many times. i install esp-idf v4.4 in VScode, it worked, can build and flash. but when i install esp-idf v5. i can't flash! it's a torture. i reinstall window , then download VScode and ESP extension. download ESP-IDF V4.4.2 and ESP-TOOL. it worked. |
This seems to be happening in ESP-IDF itself as shown in here. Could you delete the |
Hello @brianignacio5 I also ran into this issue and followed your tips above, but the issue is still present
it seems that the workaround mentioned is not valid. could you give me a hand? |
So it isn't a great workaround but I got it working by creating a new windows user on my computer named "build" and installed it fresh using that. Seems to be working again on that account but still not working on my main account. |
it is magic😂 |
Hello Bro, any updates about it? the issue is still present. the guy from ESP-IDF told me that the root is caused by the vscode-extension, while as you mentioned above, it seems to be related with ESP-IDF😂 any other workarounds can share with me? thanks in advance. pls, let me know if a new ticket is needed. |
Hey @xiaolongba I was busy with other tasks but today I'll try to find the reason why is it failing in the extension xD. Not sure what is making it break from extension. |
perfect. many thanks for your prompt replies |
@brianignacio5 it seems that there is one guy who gave us one workaround I have a try just now and it works. the details as this link:espressif/esp-idf#9861 (comment) |
Importing esptool in wrappers could cause importing the wrapper itself. Updating the PATH is not reliable. For example, os.path.realpath() changes the Windows driver letter to uppercase therefore, misses the right path for users with small device letters in their PATH. Removing paths without considering cases could also lead to errors. This fix invokes esptool scripts as modules without the need to importing them. Closes #9861 Closes espressif/vscode-esp-idf-extension#791
Importing esptool in wrappers could cause importing the wrapper itself. Updating the PATH is not reliable. For example, os.path.realpath() changes the Windows driver letter to uppercase therefore, misses the right path for users with small device letters in their PATH. Removing paths without considering cases could also lead to errors. This fix invokes esptool scripts as modules without the need to importing them. Closes #9861 Closes espressif/vscode-esp-idf-extension#791
OS
Windows
Operating System version
win11
Visual Studio Code version
1.70
ESP-IDF version
5.0
Python version
3.8.7
Doctor command output
Extension
No response
Description
in here
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: