# Weather example fails - Cosmic Unicorn

**URL:** <https://forums.pimoroni.com/t/weather-example-fails-cosmic-unicorn/22537>\
**Category:** Support\
**Created:** [July 17, 2023, 10:31am UTC](https://forums.pimoroni.com/t/weather-example-fails-cosmic-unicorn/22537 "2023-07-17T10:31:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Smithee11](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@Smithee11](https://forums.pimoroni.com/u/Smithee11)\
**Post date:** [July 17, 2023, 10:31am UTC](https://forums.pimoroni.com/t/weather-example-fails-cosmic-unicorn/22537/1 "2023-07-17T10:31:00Z")

</div>

It connects, gets data but then outputs:

Requesting URL: [http://api.open-meteo.com/v1/forecast?latitude=53.3861&longitude=-1.423999&current\_weather=true&timezone=auto](http://api.open-meteo.com/v1/forecast?latitude=53.3861&longitude=-1.423999&current_weather=true&timezone=auto)  
Data obtained!  
{‘longitude’: -1.42, ‘utc\_offset\_seconds’: 3600, ‘timezone’: ‘Europe/London’, ‘elevation’: 71.0, ‘current\_weather’: {‘windspeed’: 16.2, ‘weathercode’: 2, ‘is\_day’: 1, ‘time’: ‘2023-07-17T11:00’, ‘winddirection’: 269.0, ‘temperature’: 17.3}, ‘timezone\_abbreviation’: ‘BST’, ‘latitude’: 53.38, ‘generationtime\_ms’: 1.101017}  
Temp: 17.3°C Wind Speed: 16.2kmph Wind Direction: W As of: 2023-07-17, 11:00

Traceback (most recent call last):  
File “”, line 152, in   
File “”, line 123, in draw\_page  
OSError: [Errno 2] ENOENT

Any ideas would be great,

Andy

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/halfer/32/9738_2.png) [@halfer](https://forums.pimoroni.com/u/halfer)\
**Post date:** [July 17, 2023, 11:02am UTC](https://forums.pimoroni.com/t/weather-example-fails-cosmic-unicorn/22537/2 "2023-07-17T11:02:00Z")

</div>

Could you:

1. Format your error here with code fences (three consecutive backticks at the start and end, on their own line). It is not critical in this case, but it is an essential technique for showing code and error logs generally. You can edit your post to do this.
2. Using the line numbers provided, show the code (or a snippet of it) using another code block.
3. Point to the tutorial or repository you are using (not all readers will be aware of the tutorial or the product you are working on)
4. I would guess you are using MicroPython, but it is worth making that clear. Explain what platform you are running it on.

Thanks!

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/halfer/32/9738_2.png) [@halfer](https://forums.pimoroni.com/u/halfer)\
**Post date:** [July 17, 2023, 11:03am UTC](https://forums.pimoroni.com/t/weather-example-fails-cosmic-unicorn/22537/3 "2023-07-17T11:03:26Z")

</div>

I found [a number of posts](https://duckduckgo.com/?q=cosmic+unicorn+OSError%3A+%5BErrno+2%5D+ENOENT&ia=web) about this error, but the error text is very vague, so it is hard to work out which ones might be relevant. Is there not more information in the stack trace?

---

<div class="post-metadata">

**Author:** ![hel](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/hel/32/6075_2.png) [@hel](https://forums.pimoroni.com/u/hel)\
**Post date:** [July 17, 2023, 12:10pm UTC](https://forums.pimoroni.com/t/weather-example-fails-cosmic-unicorn/22537/4 "2023-07-17T12:10:41Z")

</div>

ENOENT usually means that it’s trying to open a file that’s missing - have you got your icons saved in the right place?

---

<div class="post-metadata">

**Author:** ![Smithee11](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@Smithee11](https://forums.pimoroni.com/u/Smithee11)\
**Post date:** [July 17, 2023, 1:10pm UTC](https://forums.pimoroni.com/t/weather-example-fails-cosmic-unicorn/22537/5 "2023-07-17T13:10:20Z")

</div>

Turns out i had moved a dif example of the icons files to the pi - its now fixed and working, thanks for the pointers :)

Andy
