Python syntax error Matrix Portal S3

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.
Post Reply
User avatar
JacknVegas
 
Posts: 61
Joined: Fri Nov 01, 2019 5:59 pm

Python syntax error Matrix Portal S3

Post by JacknVegas »

Following the "Playground" project to use a Matrix Portal S3 to drive a Weather display I have encountered a syntax error. I am using the "openweathermap.org version 3.0 access string". The Mu editor stops the execution at:

Code: Select all

DATA_SOURCE = "https://api.openweathermap.org/data/3.0/onecall?lat={lat}&lon={Lon}&apiid={API key}"
saying this line has a syntax error. I have not programmed enough in Circuit Python to see the error.

[edit by danhalbert to put line in code tags]

User avatar
mikeysklar
 
Posts: 15469
Joined: Mon Aug 01, 2016 8:10 pm

Re: Python syntax error Matrix Portal S3

Post by mikeysklar »

Which guide are you following? I don't see a weather example designed for the Matrix Portal S3 in the Adafruit Learn or Playground guides collection.

User avatar
JacknVegas
 
Posts: 61
Joined: Fri Nov 01, 2019 5:59 pm

Re: Python syntax error Matrix Portal S3

Post by JacknVegas »

The program I am having trouble with was a modification of the John Park Weather program written for the M4 airlift chip. The mod was prepared by someone with the initials jc for the Matrix Portal S3 to take advantage of the increased memory to add forecast functions as well. Attached is the full listing:
WeatherMatrixPortalS3.pdf
(47.67 KiB) Downloaded 6 times

User avatar
mikeysklar
 
Posts: 15469
Joined: Mon Aug 01, 2016 8:10 pm

Re: Python syntax error Matrix Portal S3

Post by mikeysklar »

Where did you pickup the code from the PDF?

User avatar
picofun
 
Posts: 67
Joined: Fri Jul 29, 2022 9:22 am

Re: Python syntax error Matrix Portal S3

Post by picofun »

The code in the PDF is a different version. There is no "onecall" API call in the PDF.

I think it would help if you could post the full error traceback and the part of your code that actually uses the line that mu is complaining about.

User avatar
JacknVegas
 
Posts: 61
Joined: Fri Nov 01, 2019 5:59 pm

Re: Python syntax error Matrix Portal S3

Post by JacknVegas »

Go to the top of my post and Dan put the line of code causing problems in a “Select All”. The reason I didn’t post the final software version is because it has my actual API and other personal numbers. Otherwise I made no changes to the code. I still think the code came from “Playground “ but I cannot find it anywhere now.

User avatar
JacknVegas
 
Posts: 61
Joined: Fri Nov 01, 2019 5:59 pm

Re: Python syntax error Matrix Portal S3

Post by JacknVegas »

Do the “3.0” and “onecall” terms need a new library to define them?

Post Reply
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”