beamerblvd / weatherlink-python

A Python library for dealing with Davis® WeatherLink® database files, web service downloads, and console downloads
Other
17 stars 9 forks source link

ValueError in WindDirection #1

Open cedmfr opened 5 years ago

cedmfr commented 5 years ago

Dear developer, I have an error "ValueError: -1 is not a valid WindDirection". This is done after an .import_data() procedure of an weatherlink.importer.Importer object from a wlk file. How to correct this bug ? I am working in material science laboratory and your project is interesting for us to avoid manual operation of export data from our VantagePro2. If needed our file is below. Regards.

cedmfr commented 5 years ago

2019-04.wlk.zip

ckluss commented 4 years ago

Hi

would be a great solution to parse wlk files for me, but even with the testfile

sample-database-2016-04.wlk

I get the same error:

>>> from __future__ import absolute_import, print_function
>>> 
>>> import sys
>>> 
>>> from weatherlink.importer import Importer
>>> from weatherlink.utils import calculate_all_record_values
>>> 
>>> importer = Importer("sample-database-2016-04.wlk")
>>> 
>>> importer.import_data()
ValueError: -1 is not a valid WindDirection

Kind regards Christof

daquinterop commented 4 years ago

Hi Guys, I've just solved that error, the changes in the library with the solution are in the pull request (the only one by now)

lim9gu commented 1 year ago

Dear all,

I am trying to run the code tests/scripts/test-download.py considering the recent solution. But could you let me know sys.argv[4]?

downloader.download(dateutil.parser.parse(sys.argv[4]))

I've got an error when I enter header_data or sample-download.bin This is the error when the "header_data" is entered.

ParserError: Unknown string format: Model=16
Records=165
MaxRecords=10240
ArchiveInt=5
ConsoleVer=Dec 11 2012
VantageTX=0

Regards,