Skip to content

raise ValueError("data_service_url must end in '.org'")  #38

@hazaioud

Description

@hazaioud

Hello,

I want to use this code to download data from pvoutput.org. I don't have any PV system registered but I've donated in order to be able to download the data of other pv systems. I installed the library via the pip install method. After that importing the library is not causing any problem.

The problem occurs when I want to acces a PV system. I do this by writing 'PVOutput(API_KEY, SYSTEM_ID)'. With API_Key= my API_key that i can find under settings in pvouput.org; and System_ID= the id of the system from which I want to acces the data, so the 5 numbers coming after &sid= in the url. This gives me following error in python:

File "", line 1, in
PVOutput(API_KEY, SYSTEM_ID)

File "c:\users\hazaioud\src\pvoutput\pvoutput\pvoutput.py", line 91, in init
raise ValueError("data_service_url must end in '.org'")

ValueError: data_service_url must end in '.org'

After that I've putted source code as comment:

if self.data_service_url is not None:

if not self.data_service_url.strip('/').endswith('.org'):

raise ValueError("data_service_url must end in '.org'")

Than I don't see the error anymore but I'm not sure wether that is intented or not. Anyway, after that I try to asses the pvsystems within a radius of 5 km from the given coordinates:

pv.search(query='5km', lat=52.0668589, lon=-1.3484038)

But than Python freezes totally.....

What I'm doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions