question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: 'OWM' object has no attribute 'weather_at_place'`

See original GitHub issue

GitHub actions returned this error code, after hundreds of successful runs. Run python main.py Traceback (most recent call last): File "main.py", line 68, in <module> csvArrIn = getWeatherInfo(city) File "main.py", line 35, in getWeatherInfo obs = owm.weather_at_place(city+',CZ') AttributeError: 'OWM' object has no attribute 'weather_at_place'

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:19 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
geofbaumcommented, May 31, 2020

@filiptronicek

From the short part of code that is visible in the error message it appears that you’re missing a step to call ‘weather_at_place’ as it looks like you’re trying to directly call it from owm.

Per the docs and altered to show your code usage the steps to call that attribute require calling weather_manager() before:

owm = OWM('your-api-key')
mgr = owm.weather_manager()
observation = mgr.weather_at_place(city+',CZ')
3reactions
csparpacommented, May 31, 2020

Nope

replace “get_weather()” with “weather”

Java-style getters have been removed in pyowm v3

Claudio Sparpaglione csparpa@gmail.com http://linkedin.com/in/claudiosparpaglione

On Sun, May 31, 2020, 19:36 Filip Troníček notifications@github.com wrote:

@geofbaum https://github.com/geofbaum is this code correct? Throws an error still

def getWeatherInfo(city: str): owm = OWM(API_key) mgr = owm.weather_manager() obs = mgr.weather_at_place(city+‘,CZ’) w = obs.get_weather()

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/csparpa/pyowm/issues/313#issuecomment-636503052, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHOXXSDA7IAYA3D4BAOK6LRUKIR5ANCNFSM4NPEQFRQ .

Read more comments on GitHub >

github_iconTop Results From Across the Web

'OWM' object has no attribute 'weather_at_place'
from pyowm import OWM owm = OWM('your-API-key') # You MUST provide a valid API key # Search for current weather in London (Great...
Read more >
Frequently Asked Questions - pyowm documentation
from pyowm import OWM >>> owm = OWM('your-api-key-here') >>> mgr = owm.weather_manager() AttributeError: 'OWM25' object has no attribute 'weather_manager'.
Read more >
'OWM' object has no attribute 'weather_at_place'
Ошибка observation = owm.weather_at_place(place) AttributeError: 'OWM' object has no attribute 'weather_at_place'. Что тут не правильно написано? import ...
Read more >
pyowm Documentation - Read the Docs
OWM data from Python applications via a simple object model and in a ... AttributeError: 'OWM25' object has no attribute 'xxx'.
Read more >
Dress for the weather: pyowm problem - Raspberry Pi Forums
UnauthorizedError: Your API subscription level does not allow to perform this operation ... Does your code literally have owm = pyowm.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found