opennem / nemweb

python package to directly download and process AEMO files from http://www.nemweb.com.au/
MIT License
32 stars 19 forks source link

path problem under windows 10 #22

Open djouallah opened 5 years ago

djouallah commented 5 years ago

I am trying to install using

python setup.py install

whatever I do for the sql path, i got this error

File "C:\Users\mimoune.djouallah\AppData\Local\Continuum\anaconda3\lib\distutils\util.py", line 110, in convert_path raise ValueError("path '%s' cannot be absolute" % pathname) ValueError: path '/' cannot be absolute

UmarAdil commented 5 years ago

I have the same issue, both in Linux( Ubuntu) as well as on windows. Here is snippet from Linux

`Python 3.6.8 (default, Jan 14 2019, 11:02:34) [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux Type "help", "copyright", "credits" or "license" for more information.

from nemweb import nemweb_current nemweb_current.update_datasets(['dispatch_scada']) Traceback (most recent call last): File "/home/umar/Downloads/nemweb-master/nemweb/nemweb_sqlite.py", line 51, in start_from table_name, db_name=db_name, timestamp_col=timestamp_col File "/home/umar/Downloads/nemweb-master/nemweb/nemweb_sqlite.py", line 30, in table_latest_record with sqlite3.connect(db_path) as conn: sqlite3.OperationalError: unable to open database file

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "/home/umar/Downloads/nemweb-master/nemweb/nemweb_current.py", line 155, in update_datasets filehandler.update_data(DATASETS[dataset_name], print_progress=print_progress) File "/home/umar/Downloads/nemweb-master/nemweb/nemweb_current.py", line 63, in update_data db_name=db_name File "/home/umar/Downloads/nemweb-master/nemweb/nemweb_sqlite.py", line 59, in start_from date = datetime.datetime.strptime(start_date, "%Y%m%d") TypeError: strptime() argument 1 must be str, not None `

Bazarovay commented 5 years ago

You can fix it by updating package_data in setup.py for cross-platform support. package_data={'nemweb': os.path.join('tests', '2018_09_21.pkl')}