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

Failure steps in running TempC example #55

Open
michaelsuhl11 opened this issue Jul 17, 2019 · 0 comments

Comments

@michaelsuhl11
Copy link

commented Jul 17, 2019

I'm trying to confirm compatibility and operation of eeweather and eemeter using OpenEE docs.

C:\Users\micha>python
Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import eeweather
import datetime
import pytz
ranked_stations = eeweather.rank_stations(35, -95)
station, warnings = eeweather.select_station(ranked_stations)
station
ISDStation('720627')
ranked_stations.loc[station.usaf_id]
rank 1
distance_meters 32692.7
latitude 35.283
longitude -95.1
iecc_climate_zone 3
iecc_moisture_regime A
ba_climate_zone Mixed-Humid
ca_climate_zone None
rough_quality low
elevation 183.2
state OK
tmy3_class None
is_tmy3 False
is_cz2010 False
difference_elevation_meters None
Name: 720627, dtype: object
start_date = datetime.datetime(2016, 6, 1, tzinfo=pytz.UTC)
end_date = datetime.datetime(2017, 9, 15, tzinfo=pytz.UTC)
tempC = station.load_isd_hourly_temp_data(start_date, end_date)
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\micha\AppData\Local\Programs\Python\Python36\lib\site-packages\eeweather\stations.py", line 1458, in load_isd_hourly_temp_data
error_on_missing_years=error_on_missing_years,
File "C:\Users\micha\AppData\Local\Programs\Python\Python36\lib\site-packages\eeweather\stations.py", line 853, in load_isd_hourly_temp_data
for year in range(start.year, end.year + 1)
File "C:\Users\micha\AppData\Local\Programs\Python\Python36\lib\site-packages\eeweather\stations.py", line 853, in
for year in range(start.year, end.year + 1)
File "C:\Users\micha\AppData\Local\Programs\Python\Python36\lib\site-packages\eeweather\stations.py", line 715, in load_isd_hourly_temp_data_cached_proxy
data_ok = validate_isd_hourly_temp_data_cache(usaf_id, year)
File "C:\Users\micha\AppData\Local\Programs\Python\Python36\lib\site-packages\eeweather\stations.py", line 484, in validate_isd_hourly_temp_data_cache
store = eeweather.connections.key_value_store_proxy.get_store()
File "C:\Users\micha\AppData\Local\Programs\Python\Python36\lib\site-packages\eeweather\connections.py", line 120, in get_store
self._store = KeyValueStore()
File "C:\Users\micha\AppData\Local\Programs\Python\Python36\lib\site-packages\eeweather\cache.py", line 52, in init
raise ImportError("KeyValueStore requires sqlalchemy.")
ImportError: KeyValueStore requires sqlalchemy.

After receiving this error, I installed SQLAlchemy. The ImportError stopped, but I received the following when writing the next two example lines.

tempC.head()
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'tuple' object has no attribute 'head'
tempF = tempC * 1.8 + 32
Traceback (most recent call last):
File "", line 1, in
TypeError: can't multiply sequence by non-int of type 'float'

I'm expecting to get tempC and convert to tempF outputs, like the example http://eemeter.openee.io/basics.html#loading-sample-data
Should SQLAlchemy be included in installation with eeweather, if it doesn't work without it?

OS: Windows 10
eemeter 2.7.0
eeweather 0.3.20
matplotlib 3.1.1
pandas 0.23.4
patsy 0.5.1
pip 19.1.1
python-dateutil 2.8.0
pytz 2019.1
SQLAlchemy 1.3.5

I'm new, so nothing is too obvious... Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.