PiCOW project

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
poundCake
 
Posts: 11
Joined: Sat Dec 03, 2022 10:01 pm

PiCOW project

Post by poundCake »

Starting a new thread for help with my Raspberry Pico project following the Adafruit guide found here:

https://learn.adafruit.com/pico-w-http- ... n?view=all

While using:

CircuitPython 8.0.0-beta.6

Previously, I started a thread with the goal to confirm that I was in the right place for help with an AdaFruit project guide. I'm starting a new thread with my current issue(s).
---

First (1/2) - I just realized an error in my/ the source code and have deleted the large paragraph I just wrote =).

line 77-78 should read:

Code: Select all

#  connect to your SSID
wifi.radio.connect(os.getenv('CIRCUITPY_WIFI_SSID'), os.getenv('CIRCUITPY_WIFI_PASSWORD'))
lines 77-78 currently read

Code: Select all

#  connect to your SSID
wifi.radio.connect(os.getenv('WIFI_SSID'), os.getenv('WIFI_PASSWORD'))
Second (2/2) - I am now bombarded with:

Code: Select all

'NoneType' object has no attribute 'find' 
in the CircuitPython REPL and I am unable to reload with < control+d > from my keyboard.

PiCOW OLED reads:
Disconnected!
None
IP: 192.168.1.42
Temperature: 65.86 F

---
1 What is the appropriate procedure for submitting a project suggestion?
2a Any ideas as to why I'm getting the "NoneType" error, and
2b Why I can't <control+d> in Mu to get out of the loop?
Last edited by poundCake on Tue Dec 27, 2022 11:26 pm, edited 1 time in total.

User avatar
poundCake
 
Posts: 11
Joined: Sat Dec 03, 2022 10:01 pm

Re: PiCOW project

Post by poundCake »

adendum:

(1/2)
Lines 182 and 228 probably need correcting as well to include ' CIRCUITPY_'

(2/2)
I found that I can stop the REPL from running by making a change to the code.py file and saving it. This action then prints:

Code: Select all

Code stopped by auto-reload.  Reloading soon.
to the REPL.

Shortly, the REPL reloads and the cycle starts again and I'm hit with:

Code: Select all

'NoneType' object has no attribute 'find'
---
Thanks in advance if you're reading along.

User avatar
tannewt
 
Posts: 3298
Joined: Thu Oct 06, 2016 8:48 pm

Re: PiCOW project

Post by tannewt »

Hi! First, the best place for guide feedback is the link on the bottom left of the page. That should notify the author of your feedback. The link for the guide you are using is: https://learn.adafruit.com/feedback/new?page_id=25205

I suspect the env variable name mismatch was introduced with the update to settings.toml.

Is there a traceback of code locations before the "'NoneType' object has no attribute 'find'" line? If not, this may be occurring in a library that catches the exception.

Lastly, you need to ctrl-c when the error messages are printing to stop it. (If it doesn't work, the example code may be catching the KeyboardInterrupt exception as well.) This is serial output. The REPL is a specific mode where each line of code is entered separately on lines that start with >>>.

User avatar
Rodger
 
Posts: 1
Joined: Thu Aug 21, 2014 8:26 pm

Re: PiCOW project

Post by Rodger »

I have been creating the Picow project but have an issue with the webserver portion of the code. My display works fine, and the temperature sensor works fine, but when I try to execute the web page from a remote device the code fails.
It appears to be when executing the code: ~ return HTTPResponse(content_type="text/html", body=webpage())~ that it fails, with an error message: ~unexpected keyword argument 'body'~. The best I can figure is that the key word body is no longer a valid argument in the HTTPRequest function, maybe an issue with this version of circuit python? Any ideas?

Adafruit CircuitPython 8.0.0-beta.6 on 2022-12-21; Raspberry Pi Pico W with rp2040

User avatar
poundCake
 
Posts: 11
Joined: Sat Dec 03, 2022 10:01 pm

Re: PiCOW project

Post by poundCake »

tannewt wrote: Wed Jan 04, 2023 12:26 pm I suspect the env variable name mismatch was introduced with the update to settings.toml
I agree with your guess as well - not that it is a big deal, either way would be fine, but it needs to be the same inside this project.

I have already submitted feedback on the project as well =)

Looks like I'm not the only one with an issue with this project/ guide. If I get any further with this code and the HTTP web server I'll report back here. But I'm probably going to keep moving on other projects.

User avatar
poundCake
 
Posts: 11
Joined: Sat Dec 03, 2022 10:01 pm

Re: PiCOW project

Post by poundCake »

Project still doesn't work - looks like the code on the site has been updated as well as some of pictures documenting the wiring of the prototyping board. I can't confirm if my wiring (original) is different than the new images. Super frustrating for a newbie...

Anyway, what is the best way to get help with this project? I'm still receiving the same error about 'nonetype' and I'm unable to get the serial to quit... and yes, I'm pressing the correct keyboard shortcuts.
Image

Image

Image
Attachments
Screenshot 2023-01-29 at 4.06.01 PM.png
Screenshot 2023-01-29 at 4.06.01 PM.png (332.47 KiB) Viewed 52 times
Screenshot 2023-01-29 at 4.05.47 PM.png
Screenshot 2023-01-29 at 4.05.47 PM.png (324.29 KiB) Viewed 52 times
Screenshot 2023-01-29 at 4.01.42 PM.png
Screenshot 2023-01-29 at 4.01.42 PM.png (204.36 KiB) Viewed 52 times

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

Return to “Adafruit CircuitPython”