# Help with ISS Tracker Pico Project

**URL:** <https://forum.core-electronics.com.au/t/help-with-iss-tracker-pico-project/22760>\
**Category:** Projects\
**Created:** [28 June 2025 14:56 UTC](https://forum.core-electronics.com.au/t/help-with-iss-tracker-pico-project/22760 "2025-06-28T14:56:25Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dale280804](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@Dale280804](https://forum.core-electronics.com.au/u/Dale280804)\
**Post date:** [28 June 2025 14:56 UTC](https://forum.core-electronics.com.au/t/help-with-iss-tracker-pico-project/22760/1 "2025-06-28T14:56:25Z")

</div>

Hi,

I am trying to run an awesome project i found online:  
([https://www.instructables.com/ISS-Tracker-Using-a-Raspberry-Pico/](https://www.instructables.com/ISS-Tracker-Using-a-Raspberry-Pico/))  
and wondered if anyone would have any knowledge on the below error codes i get when trying to run the main code on my pico 2w through thonny?  
Traceback (most recent call last):  
File “”, line 153, in   
File “”, line 113, in showLatLon  
File “”, line 78, in getPos  
File “requests/ **init**.py”, line 201, in get  
File “requests/ **init**.py”, line 79, in request  
OSError: -2  
Any help appreciated.

---

<div class="post-metadata">

**Author:** ![Dan](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/dan/32/10815_2.png) [@Dan](https://forum.core-electronics.com.au/u/Dan)\
**Post date:** [30 June 2025 01:00 UTC](https://forum.core-electronics.com.au/t/help-with-iss-tracker-pico-project/22760/2 "2025-06-30T01:00:33Z")

</div>

Hi @Dale280804

The **OSError: -2** error that you’ve encountered is generally as a result of not being connected to WiFi, you will need to make sure that you have added your SSID and password to the secrets.py for the project, and also your current coordinates, below is how it should look.

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/7/70a3cba15c2fb06d69f79b840a1b447b0592a0e5.png)

---

<div class="post-metadata">

**Author:** ![Robert93820](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@Robert93820](https://forum.core-electronics.com.au/u/Robert93820)\
**Post date:** [30 June 2025 03:13 UTC](https://forum.core-electronics.com.au/t/help-with-iss-tracker-pico-project/22760/3 "2025-06-30T03:13:50Z")

</div>

Hi Dan  
You have your Lat and Long reversed (Core address). Lat will be max + or - 90º (north and south poles).  
Cheers Bob

---

<div class="post-metadata">

**Author:** ![Dale280804](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@Dale280804](https://forum.core-electronics.com.au/u/Dale280804)\
**Post date:** [30 June 2025 19:52 UTC](https://forum.core-electronics.com.au/t/help-with-iss-tracker-pico-project/22760/4 "2025-06-30T19:52:13Z")

</div>

Hi @Dan & @Robert93820  
Thank you for the reply, i do run the secrets code along with the coordinates and it runs without throwing up a complaint, i then run main and get the below error  
Traceback (most recent call last):  
File “”, line 153, in   
File “”, line 113, in showLatLon  
File “”, line 78, in getPos  
File “requests/ **init**.py”, line 201, in get  
File “requests/ **init**.py”, line 79, in request  
OSError: -2

on the pico display 2 i do get a black display coming up and text saying starting in the corner but nothing loads.  
i have added the files to my pico

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/9/97e6309d65c876f52012ee428b0945a1c3e9208e.png)

not sure if they look correct in pic

Many thanks in advance for help with this.

---

<div class="post-metadata">

**Author:** ![Ryan](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/ryan/32/12254_2.png) [@Ryan](https://forum.core-electronics.com.au/u/Ryan)\
**Post date:** [30 June 2025 23:44 UTC](https://forum.core-electronics.com.au/t/help-with-iss-tracker-pico-project/22760/5 "2025-06-30T23:44:56Z")

</div>

Hi @Dale280804,

Thanks for the update! The `OSError: -2` usually means the Pico W can’t resolve the API’s hostname — which almost always points to a Wi-Fi connection issue.

To help diagnose, try running this minimal test script on your Pico W to confirm it can connect to Wi-Fi and reach the ISS API:

```auto
import network
import urequests
import time

def connect():
    wlan = network.WLAN(network.STA_IF)
    wlan.active(True)
    wlan.connect("YOUR_SSID", "YOUR_PASSWORD")

    max_wait = 10
    while wlan.status() != 3 and max_wait > 0:
        print('Waiting for connection...')
        time.sleep(1)
        max_wait -= 1

    if wlan.status() != 3:
        raise RuntimeError('Wi-Fi connection failed')
    else:
        print('Connected:', wlan.ifconfig())

connect()

resp = urequests.get("http://api.open-notify.org/iss-now.json")
print(resp.json())

```

Replace `"YOUR_SSID"` and `"YOUR_PASSWORD"` with your actual Wi-Fi credentials. If it fails with the same error, the Pico isn’t successfully connecting to your network. A successful execution of the code should show the connection status messages and then the ISS position JSON printer.

Further things to check if this fails are:

- try running this without Thonny connected (just run as `main.py` and reset the Pico) because sometimes the REPL interferes with networking.
- Double-check your `secrets.py` file name, and contents, and that it’s in the same folder as your main script.

Let us know how that goes.

---

<div class="post-metadata">

**Author:** ![Dale280804](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@Dale280804](https://forum.core-electronics.com.au/u/Dale280804)\
**Post date:** [6 July 2025 19:55 UTC](https://forum.core-electronics.com.au/t/help-with-iss-tracker-pico-project/22760/6 "2025-07-06T19:55:50Z")

</div>

> [@Ryan](#):
>
> ```auto
> import network
> import urequests
> import time
> 
> def connect():
> wlan = network.WLAN(network.STA_IF)
> wlan.active(True)
> wlan.connect("YOUR_SSID", "YOUR_PASSWORD")
> 
> max_wait = 10
> while wlan.status() != 3 and max_wait > 0:
> print('Waiting for connection...')
> time.sleep(1)
> max_wait -= 1
> 
> if wlan.status() != 3:
> raise RuntimeError('Wi-Fi connection failed')
> else:
> print('Connected:', wlan.ifconfig())
> 
> connect()
> 
> resp = urequests.get("http://api.open-notify.org/iss-now.json")
> 
> ```

Hi @Ryan, thank you for this, i have run this test and comes back successful with below reply:  
{‘message’: ‘success’, ‘iss\_position’: {‘longitude’: ‘171.9577’, ‘latitude’: ‘-7.2601’}, ‘timestamp’: 1751831641}

---

<div class="post-metadata">

**Author:** ![Dale280804](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@Dale280804](https://forum.core-electronics.com.au/u/Dale280804)\
**Post date:** [6 July 2025 20:02 UTC](https://forum.core-electronics.com.au/t/help-with-iss-tracker-pico-project/22760/7 "2025-07-06T20:02:17Z")

</div>

I have taken a pic of how i have secrests set up with my lon and lat removing my ssid an password details and attached to this i have also attached a pic of the screen i receive on my display pack and the error it throws up on when i run main script, i can connect to wifi through it as proven with below test, thanks very much for help so far from the community 🙂

 ![ISSmainfault](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/4/4e3b607f5574eb58b5518e2f5e830dfc74f4e602.png)  
 ![snipsecrets](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/4/45ef2ff915f13c47a00d74c2be539600097a6a51.png)  
 ![image0 - Copy](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/e/e0bb23abe1684f9ec86923a7d76bacf8a61b88ae.jpeg)

---

<div class="post-metadata">

**Author:** ![Jeff105671](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/jeff105671/32/3729_2.png) [@Jeff105671](https://forum.core-electronics.com.au/u/Jeff105671)\
**Post date:** [6 July 2025 21:54 UTC](https://forum.core-electronics.com.au/t/help-with-iss-tracker-pico-project/22760/8 "2025-07-06T21:54:25Z")

</div>

If you compare your secrets file with the example above you will notice two differences.

1. The latitude and longitude should be numeric only: remove the quotation marks around the numbers.
2. The latitude should be numeric only: remove the closing bracket.

The error message indicates a problem with using the numbers in the file, so those changes should fix it.

---

<div class="post-metadata">

**Author:** ![Dale280804](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@Dale280804](https://forum.core-electronics.com.au/u/Dale280804)\
**Post date:** [7 July 2025 11:22 UTC](https://forum.core-electronics.com.au/t/help-with-iss-tracker-pico-project/22760/9 "2025-07-07T11:22:21Z")

</div>

Hi @Jeff105671  
I have removed the quotation marks and the closing bracket, and now when i run main script i get the below:

 ![main error2](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/1/15573273a3734976019cba89ad975ce82db622ad.png)

I did notice on the display, a message pops up saying lat and lon briefly before disappearing and showing just a black screen.

Many thanks

---

<div class="post-metadata">

**Author:** ![Dale280804](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@Dale280804](https://forum.core-electronics.com.au/u/Dale280804)\
**Post date:** [7 July 2025 11:53 UTC](https://forum.core-electronics.com.au/t/help-with-iss-tracker-pico-project/22760/10 "2025-07-07T11:53:44Z")

</div>

okay just realised World.jpg should be all lower case so changed it and main now runs without throwing up any errors however i am still on getting the starting text on black background as shown in above pic.

---

<div class="post-metadata">

**Author:** ![Jeff105671](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/jeff105671/32/3729_2.png) [@Jeff105671](https://forum.core-electronics.com.au/u/Jeff105671)\
**Post date:** [7 July 2025 11:58 UTC](https://forum.core-electronics.com.au/t/help-with-iss-tracker-pico-project/22760/11 "2025-07-07T11:58:46Z")

</div>

[Errno2] ENOENT is a file access problem - the file doesn’t exist, the path is wrong, the file permission is not correct or something similar. Line 90 in method showMap() is  
` j.open_file("world.jpg")`

so the problem is associated with finding or opening that file. Make sure that “world.jpg” exists, is at the default file access location for the script and has the permissions necessary to allow access from your script.

---

<div class="post-metadata">

**Author:** ![Dale280804](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@Dale280804](https://forum.core-electronics.com.au/u/Dale280804)\
**Post date:** [7 July 2025 14:58 UTC](https://forum.core-electronics.com.au/t/help-with-iss-tracker-pico-project/22760/12 "2025-07-07T14:58:59Z")

</div>

Hi all, this is now running, i made the adjustments with the help i have received from the community so big thank you from me for your help 🙂  
Only issue i have now is getting it to fit my Pico Display 2, have tried adjusting to 320 x 240 & 320 x 160 but world map is to zoomed in and missing quite a large bit of the world.  
I am sure i will get there.  
Thanks again.

---

<div class="post-metadata">

**Author:** ![Jeff105671](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/jeff105671/32/3729_2.png) [@Jeff105671](https://forum.core-electronics.com.au/u/Jeff105671)\
**Post date:** [7 July 2025 23:08 UTC](https://forum.core-electronics.com.au/t/help-with-iss-tracker-pico-project/22760/13 "2025-07-07T23:08:17Z")

</div>

> [@Dale280804](#):
>
> …have tried adjusting to 320 x 240 & 320 x 160

Is that the display you have adjusted, or the image? Note that the image available for downloading is smaller than the image in the example of the display, as it is chopped off between about Anchorage and Darwin, and is only 180x120. I can’t tell what scaling option the code is using (jpegdec.jpegdec?) but the best starting assumption would be unscaled, so your world map should match the display size.

---

<div class="post-metadata">

**Author:** ![Ryan](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/ryan/32/12254_2.png) [@Ryan](https://forum.core-electronics.com.au/u/Ryan)\
**Post date:** [7 July 2025 23:21 UTC](https://forum.core-electronics.com.au/t/help-with-iss-tracker-pico-project/22760/14 "2025-07-07T23:21:53Z")

</div>

Hey @Dale280804,

Glad to hear its up and running!

I agree with Jeff, sounds like the map image is too small for your Pico Display 2, which has a resolution of 320x240 pixels.

To fix this, resize the map image to match your display resolution (320x240). You can do this using an image editor or with a simple Python script on your computer, for example:

```auto
from PIL import Image

img = Image.open("world.jpg")
resized = img.resize((320, 240))
resized.save("world_resized.jpg")

```

Then replace the image on your Pico with the resized version named “world.jpg”. This should make the entire world map fit correctly on your display.

---

<div class="post-metadata">

**Author:** ![Dale280804](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@Dale280804](https://forum.core-electronics.com.au/u/Dale280804)\
**Post date:** [9 July 2025 08:52 UTC](https://forum.core-electronics.com.au/t/help-with-iss-tracker-pico-project/22760/15 "2025-07-09T08:52:35Z")

</div>

Okay new issue 🙂 after a short while it stops running with the below error:  
Traceback (most recent call last):  
File “”, line 153, in   
File “”, line 113, in showLatLon  
File “”, line 78, in getPos  
File “requests/ **init**.py”, line 201, in get  
File “requests/ **init**.py”, line 94, in request  
OSError: [Errno 103] ECONNABORTED

Any ideas on how to fix this issue appreciated.

---

<div class="post-metadata">

**Author:** ![Liam](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/liam/32/3562_2.png) [@Liam](https://forum.core-electronics.com.au/u/Liam)\
**Post date:** [10 July 2025 04:38 UTC](https://forum.core-electronics.com.au/t/help-with-iss-tracker-pico-project/22760/16 "2025-07-10T04:38:04Z")

</div>

Hi Dale,

It looks like this one is a connection error.

Are you able to perform any bare-bones tests for the WiFi connection?  
We have some examples here: [Raspberry Pi Pico W | Connecting to the Internet - Tutorial Australia](https://core-electronics.com.au/guides/raspberry-pi-pico/raspberry-pi-pico-w-connect-to-the-internet/)

The code doesn’t seem to handle the request very cleanly either, it might be worth feeding it through an LLM asking it to make the code more resilient, particularly against connection outages.

Let us know how you go!  
Liam
