Where does Thonny keep it's modules?

2,077 views
Skip to first unread message

Marc LeFevre

unread,
Jun 14, 2022, 8:44:19 AM6/14/22
to thonny
I'm just getting started with Thonny on the RP2040 after using Python for years.

I'm working with an SSD1306 OLED display and I find that when I import ssd1306, I get

Traceback (most recent call last):
  File "<stdin>", line 4, in <module>
  File "ssd1306.py", line 2
IndentationError: unexpected indent


This is not my file so I need to find it to troubleshoot the problem.  I searched the Lib and libs folder in the installation directory but did not find them or the problem.

Where should I look?

Aivar Annamaa

unread,
Jun 17, 2022, 10:17:46 AM6/17/22
to thonny
Hi!

If you are using Thonny with MicroPython back-end (or MicroPython "mode"), then you need to check the /lib folder on your device (View => Files).

Best regards,
Aivar

Rick Appling

unread,
Sep 6, 2022, 12:54:51 AM9/6/22
to thonny
I am having the same problem. I am getting the same error codes. Both main.py and ssd1306.py are installed. I have tried several different main.py. They all return errors. And I have tried reading the document on the commands. I just couldn't figure it out.

Aivar Annamaa

unread,
Sep 9, 2022, 2:58:25 PM9/9/22
to thonny
>  Both main.py and ssd1306.py are installed

Where are they installed to? 

>  I am getting the same error codes.

You mean indentation error? In this case you need to investigate the content of your ssd1306.py

Reply all
Reply to author
Forward
0 new messages