10000 Ensure Thonny's backends don't get confused by other installations · Issue #2616 · thonny/thonny · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Ensure Thonny's backends don't get confused by other installations #2616

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

Closed
HeinzEgger opened this issue Jan 15, 2023 · 6 comments
Closed

Ensure Thonny's backends don't get confused by other installations #2616

HeinzEgger opened this issue Jan 15, 2023 · 6 comments

Comments

@HeinzEgger
Copy link

This is a follow-up to closed issue: #2610
I followed the steps of issue #2360 and had no success. Today I started my machine and removed Thonny, reinstalled it with your file thonny-4.0.1.bash and well, I can connect to the ESP8266. But there is always an error message:
_Traceback (most recent call last):
File "/home/heinz/apps/thonny/lib/python3.10/site-packages/thonny/plugins/esp/esp_back.py", line 5, in
from thonny.plugins.micropython.bare_metal_backend import (
ModuleNotFoundError: No module named 'thonny.plugins.micropython.bare_metal_backend'

Process ended with exit code 1._
Thonny-ModuleNotFoundError-2023-01-15 13-44-21

I looked through all the mentioned paths in the error message, and did not find anything missing. See attached screenshot.
What is going wrong?

@aivarannamaa
Copy link
Member

Thank you for the report!

Please reproduce this issue and then, without doing anything else, select "Tools => Options => Open Thonny data folder" and post the backend.log you find in this folder.

@HeinzEgger
Copy link
Author

I have done so. But the file backend.log does not show anything. There was an old file of the same name, dating back to the 12. December 2022 (attached). But I think this has no relevance. I created a new backend.log file but it stayed empty. The frontend.log contains some information (attached). Have I to change Thonny's settings? Mine are as shown in the screenshot (attached). Also the export of the protocol files does not show any results. The zip file is empty.
Thonny-Settings-HeinzEgger-Bildschirmfoto-2023-01-16 16-18-11
20221213-backend.log
frontend.log

@aivarannamaa
Copy link
Member

I'm afraid you have both new and old Thonny versions in your system.

Do you have thonny in ~/.local/lib/python3.10/site-packages ? If yes, then please delete it from there and try again.

@HeinzEgger
Copy link
Author

Many thanks! Yes, this was the problem. I removed the directory thonny in ~/.local/lib/python3.10/site-packages and the new Thonny-installation works perfektly! I am so happy! And it is a lot faster than under windows!

@aivarannamaa aivarannamaa changed the title ModuleNotFoundError: No module named 'thonny.plugins.micropython.bare_metal_backend' Ensure Thonny's backends don't get confused by other installations Jan 19, 2023
@aivarannamaa aivarannamaa added this to the 4.0.x milestone Jan 19, 2023
@aivarannamaa aivarannamaa modified the milestones: 4.0.x, 4.0.3 Jan 29, 2023
@aivarannamaa
Copy link
Member

In the next Thonny version Thonny should not be confused by other installations anymore.

aivarannamaa added a commit that referenced this issue Apr 8, 2023
DanielLowry added a commit to DanielLowry/thonny that referenced this issue Apr 12, 2023
* Enhance esptool GUI, thonny#2707

* Windows fixes for esptool GUI, thonny#2707

* More forgiving image analysis for esptool GUI, thonny#2707

* black

* Misc fixes for esptool GUI, thonny#2707

* Use UDisks to find mounted filesystems on Linux (thonny#2683)

* Use UDisks to find volumes on Linux

This should generally work better on Linux than using the mount command directly.
UDisks is the utility that all major Linux desktop distributions use to handle mounting filesystems in userspace.
UDisks is accessible through a D-Bus API on the system bus.

D-Bus is complex and requires adding a dependency on a Python library for handling asynchronous communication with the bus.
I chose dbus-next since it is actively developed, modern, and doesn't require a glib main loop.
Since Thonny is not a Gtk application, it makes more sense to use native Python async functionality instead.

Inside a Flatpak, it's necessary to use UDisks via the D-Bus API to mount and check mounted filesystems.
The Flatpak sandbox prevents mounting otherwise and does not supply a mount command with the runtime.

* Smal fix for esptool GUI, thonny#2707

* Update CircuitPython links

* CircuitPython 8.1 stubs

* Small fixes for flasher dialogs, thonny#2707

* Update CREDITS.rst

* Restore MicroPython completions in the shell, thonny#2467, thonny#2419

* Rely on Jedi's builtins.pyi

* Fix MicroPython builtins completion

* Consider modules in project directory when completing

* Update MP links

* Refactor MP link collection

* Update MP links

* Require backend ACK before sending initial input

* Prepare for Python 3.12

* Update copyright year

* More Python version range fixes

* Simpler Python version display

* Move PROCESS_ACK

* Simpler Python interpreter selection

* Ensure Thonny's backends don't get confused by other installations, thonny#2616

* Alternative approach for thonny#2616

* Restore user site-packages for CPython backend, thonny#2616

* remove temp logging

* Experiment with module conflict detection, thonny#384

* Fixes for regressions caused by 4104729

---------

Co-authored-by: Aivar Annamaa <aivar.annamaa@gmail.com>
Co-authored-by: Jordan Williams <jordan@jwillikers.com>
aivarannamaa added a commit that referenced this issue Apr 15, 2023
@aivarannamaa
Copy link
Member

More conservative approach implemented in d2a96d0 because of #2851 and #2864.

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

No branches or pull requests

2 participants
0