Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DwdWeather.query() doesn't returns a dictionary because 3 arguments are required #30

Open
bsledev opened this issue Sep 16, 2020 · 1 comment

Comments

@bsledev
Copy link

bsledev commented Sep 16, 2020

When using print(DwdWeather.query()) it only returns this message: TypeError: query() missing 3 required positional arguments: 'self', 'station_id', and 'timestamp' and not the expected list of all the possible keys.

I used Python 3.8.5 and the latest dwdweather2 release.

@amotl
Copy link
Member

amotl commented Sep 25, 2020

Dear Pnem,

the signature of DwdWeather.query() is

def query(self, station_id, timestamp, recursion=0):
    """
    Get values from cache.
    station_id: Numeric station ID
    timestamp: datetime object
    """

See also dwdweather/core.py#L533-L538.

However, I strongly recommend to move on to the Wetterdienst package. It is the successor library to dwdweather and dwdweather2 and is becoming more and more popular these days. We have been trying to get this en par with all the features offered by dwdweather2 and we have come pretty far these days. Enjoy!

With kind regards,
Andreas.

cc @gutzbenj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants