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

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

Open
hazaioud opened this issue Jul 2, 2020 · 4 comments
Open

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

hazaioud opened this issue Jul 2, 2020 · 4 comments

Comments

@hazaioud
Copy link

hazaioud commented Jul 2, 2020

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?

@hazaioud hazaioud changed the title pv.search(query='5km', lat=52.0668589, lon=-1.3484038) raise ValueError("data_service_url must end in '.org'") Jul 2, 2020
@JackKelly
Copy link
Member

Hi @hazaioud sorry to hear the code isn't working correctly. I'm afraid I'm really busy with a number of other projects, so I'm not sure when I'll next get a chance to look at this code... hopefully in the not-too-distant-future...

@ssmssam
Copy link
Contributor

ssmssam commented Nov 20, 2020

Hi @hazaioud, out of interest were you trying to do this on a Windows machine? I have created a pull request, so hopefully this will work for you soon if you are still interested in the data.

@peterdudfield
Copy link
Contributor

Hi @hazaioud. I was just browsing this issue. Do you know if this is solved?

p.s thanks @ssmssam for those changes.

@hazaioud
Copy link
Author

hazaioud commented Jan 10, 2022 via email

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

4 participants