zonoskar / Goodwe2PVoutput

Script to upload Goodwe power invertor data to PVoutput website
10 stars 7 forks source link

NameError and AttributeError on Windows #3

Closed pumpkins001 closed 6 years ago

pumpkins001 commented 6 years ago

Hi, trying to run your script using Python2 on Windows 10. Quite new to this. At first I was getting this error:

_C:>python -m Goodwe2PVoutput Goodwe URL: (http://goodwe-power.com/PowerStationPlatform/PowerStationReport/InventerDetail) Goodwe Login URL: (http://goodwe-power.com/User/Login) goodwe_system_id (b6f62526-698d-4c50-8807-515bdcf87514) goodwe_user_id (Fallen) PVOutput upload URL: (http://pvoutput.org/service/r2/addstatus.jsp) pvoutput_system_id (57221) pvoutput_api (e9f68f7d6fcb8e3b05c268164a7abd29a6b66dd9) csv_dir (C\Goodwe2PVoutput) spline_fit (True) Traceback (most recent call last): File "C:\Python27\lib\runpy.py", line 174, in _run_module_as_main "main", fname, loader, pkg_name) File "C:\Python27\lib\runpy.py", line 72, in _run_code exec code in run_globals File "C:\Goodwe2PVoutput__main__.py", line 50, in config.to_string() File "Goodwe2PVoutput\goodweConfig.py", line 58, in to_string print self.INPUT_SOURCE + " (" + str(self.input_source) + ")" AttributeError: goodweConfig instance has no attribute 'inputsource'

I then added input_source: '' to the .goodwe2pvoutput config file, and got this error (skipping the text that is duplicated above, prior to the Traceback):

_Traceback (most recent call last): File "C:\Python27\lib\runpy.py", line 174, in _run_module_as_main "main", fname, loader, pkg_name) File "C:\Python27\lib\runpy.py", line 72, in _run_code exec code in runglobals File "C:\Goodwe2PVoutput__main__.py", line 83, in mainloop( goodwe, pvoutput, csv, process) NameError: name 'goodwe' is not defined

Any help would be appreciated. Would love to get this working.

zonoskar commented 6 years ago

Hi,

Thanks for tying my script. I see that I forgot to add the input_source line to the example configuration. It should say:

input_source: URL

I have been experimenting with reading the data from the USB port, but have not managed to keep it working reliably. The input_source setting allows me to switch between the gwoodwe site (URL) and the USB port.

You were smart to add the input_source line to the config file, maybe I should default to URL if the setting doesn’t make sense.

If you have any more problems, don’t hesitate to contact me.

Cheers, Dennis.

On 2 Apr 2018, at 07:10, pumpkins001 notifications@github.com wrote:

Hi, trying to run your script using Python2 on Windows 10. Quite new to this. At first I was getting this error:

_C:>python -m Goodwe2PVoutput Goodwe URL: (http://goodwe-power.com/PowerStationPlatform/PowerStationReport/InventerDetail) Goodwe Login URL: (http://goodwe-power.com/User/Login) goodwe_system_id (b6f62526-698d-4c50-8807-515bdcf87514) goodwe_user_id (Fallen) PVOutput upload URL: (http://pvoutput.org/service/r2/addstatus.jsp) pvoutput_system_id (57221) pvoutput_api (e9f68f7d6fcb8e3b05c268164a7abd29a6b66dd9) csv_dir (C\Goodwe2PVoutput) spline_fit (True) Traceback (most recent call last): File "C:\Python27\lib\runpy.py", line 174, in run_module_as_main "main", fname, loader, pkg_name) File "C:\Python27\lib\runpy.py", line 72, in run_code exec code in run_globals File "C:\Goodwe2PVoutput_main.py", line 50, in config.to_string() File "Goodwe2PVoutput\goodweConfig.py", line 58, in to_string print self.INPUT_SOURCE + " (" + str(self.input_source) + ")" AttributeError: goodweConfig instance has no attribute 'input_source'

I then added input_source: '' to the .goodwe2pvoutput config file, and got this error (skipping the text that is duplicated above, prior to the Traceback):

_Traceback (most recent call last): File "C:\Python27\lib\runpy.py", line 174, in run_module_as_main "main", fname, loader, pkg_name) File "C:\Python27\lib\runpy.py", line 72, in run_code exec code in run_globals File "C:\Goodwe2PVoutput_main.py", line 83, in mainloop( goodwe, pvoutput, csv, process) NameError: name 'goodwe' is not defined

Any help would be appreciated. Would love to get this working.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.