Pi pico W strange errors with thonny

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
KJRC
 
Posts: 23
Joined: Sun Mar 07, 2021 3:31 am

Pi pico W strange errors with thonny

Post by KJRC »

I am attempting to replicate the getting start up tutorial for my new Pico W (https://learn.adafruit.com/pico-w-wifi- ... cuitpython).

I have the beta version of CircuitPython (8) UF2 installed. I am using Thonny.

Problem 1) When I first connect my Pico W to thonny, thonny gives me this list of errors in a dialog box (below). I can close the dialog and execute the "hello World" example successfully. Wondering what this is and how to address?

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/thonny/workbench.py", line 1711, in event_generate
handler(event)
File "/usr/lib/python3/dist-packages/thonny/shell.py", line 449, in _handle_toplevel_response
self._insert_text_directly(welcome_text, ("welcome",))
File "/usr/lib/python3/dist-packages/thonny/shell.py", line 1039, in _insert_text_directly
_insert_and_highlight_urls(txt, tags)
File "/usr/lib/python3/dist-packages/thonny/shell.py", line 999, in _insert_and_highlight_urls
_insert(part, tags)
File "/usr/lib/python3/dist-packages/thonny/shell.py", line 993, in _insert
self.direct_insert("output_insert", txt, tags)
File "/usr/lib/python3/dist-packages/thonny/ui_utils.py", line 833, in direct_insert
result = tktextext.EnhancedText.direct_insert(self, index, chars, tags=tags, **kw)
File "/usr/lib/python3/dist-packages/thonny/tktextext.py", line 748, in direct_insert
super().direct_insert(index, chars, tags, **kw)
File "/usr/lib/python3/dist-packages/thonny/tktextext.py", line 162, in direct_insert
self._original_insert(index, chars, tags, **kw)
File "/usr/lib/python3/dist-packages/thonny/tktextext.py", line 38, in original_function
self.tk.call((self._original_widget_name, operation) + args)
_tkinter.TclError: character U+1f40d is above the range (U+0000-U+FFFF) allowed by Tcl



Problem 2)
When I run the example code (below) I get:
Traceback (most recent call last):
File "<stdin>", line 6, in <module>
ImportError: no module named 'ipaddress'

but this example states that no libraries are needed... So I am confused.

Code: Select all

 SPDX-FileCopyrightText: 2022 Liz Clark for Adafruit Industries
#
# SPDX-License-Identifier: MIT

import os
import ipaddress
import wifi
import socketpool

print()
print("Connecting to WiFi")

#  connect to your SSID
wifi.radio.connect(os.getenv('CIRCUITPY_WIFI_SSID'), os.getenv('CIRCUITPY_WIFI_PASSWORD'))

print("Connected to WiFi")

pool = socketpool.SocketPool(wifi.radio)

#  prints MAC address to REPL
print("My MAC addr:", [hex(i) for i in wifi.radio.mac_address])

#  prints IP address to REPL
print("My IP address is", wifi.radio.ipv4_address)

#  pings Google
ipv4 = ipaddress.ip_address("8.8.4.4")
print("Ping google.com: %f ms" % (wifi.radio.ping(ipv4)*1000))
Any help would be great.

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: Pi pico W strange errors with thonny

Post by adafruit_support_carter »

What version of Thonny are you using? It may be related to this:
https://github.com/thonny/thonny/issues/2349

User avatar
KJRC
 
Posts: 23
Joined: Sun Mar 07, 2021 3:31 am

Re: Pi pico W strange errors with thonny

Post by KJRC »

3.3.10

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: Pi pico W strange errors with thonny

Post by adafruit_support_carter »

Try updating Thonny.

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”