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

PV Error #116

Open
curiotrope opened this issue Apr 15, 2024 · 1 comment
Open

PV Error #116

curiotrope opened this issue Apr 15, 2024 · 1 comment

Comments

@curiotrope
Copy link

I've been trying to model a dwelling with PV and keep getting an error message.

Here is the code I've been using:

house = Dwelling(
    start_time=dt.datetime(2023, 1, 1, 0, 0),
    time_res=dt.timedelta(minutes=1),
    duration=dt.timedelta(days=365),
    hpxml_file =os.path.join(r'C:\Users\cstone\OneDrive - Advanced Energy\Desktop\Projects\Flexible_Demand\OCHRE\DR_Standards_Comparison_HP35_DR_PVBESS.xml'),
    schedule_input_file=os.path.join(r'C:\Users\cstone\OneDrive - Advanced Energy\Desktop\Projects\Flexible_Demand\OCHRE\schedule.csv'),  
    weather_file=os.path.join(r'C:\Users\cstone\OneDrive - Advanced Energy\Desktop\Projects\Flexible_Demand\OCHRE\USA_NC_Raleigh-Durham.Intl.AP.723060_TMY3.epw'),
    verbosity=9,
    Equipment={
         'PV': {
             'capacity': 5,
             'tilt': 20,
             'azimuth': 180,
         },
    },
)

and here is the error I get:

2024-04-15 09:13:46.668712 - OCHRE at 2023-01-01 00:00:00: Initializing OCHRE (OCHRE v0.8.4)
WARNING: Skipping garage lighting, since no garage is modeled.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\cstone\AppData\Local\Programs\Python\Python311\Lib\site-packages\ochre\Dwelling.py", line 74, in __init__
    schedule, location = load_schedule(properties, weather_station=weather_station, **house_args)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cstone\AppData\Local\Programs\Python\Python311\Lib\site-packages\ochre\utils\schedule.py", line 573, in load_schedule
    df_weather, location = import_weather(**house_args)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cstone\AppData\Local\Programs\Python\Python311\Lib\site-packages\ochre\utils\schedule.py", line 308, in import_weather
    create_sam_weather_file(df_sam, location, **kwargs)
  File "C:\Users\cstone\AppData\Local\Programs\Python\Python311\Lib\site-packages\ochre\utils\schedule.py", line 126, in create_sam_weather_file
    sam_weather_file = default_sam_weather_file.format(kwargs['main_sim_name'])
                                                       ~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'main_sim_name'

How do I fix this error?

@mnblonsky
Copy link
Collaborator

This is a known issue. It's been fixed in the dev branch. I'd recommend running with that branch. If you need to switch branches and already have ochre installed, I would run:

pip uninstall ochre-nrel
pip install git+https://github.com/NREL/OCHRE@dev

We'll have this fixed in the next release.

@mnblonsky mnblonsky added this to the V 0.8.5 Release milestone Apr 17, 2024
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

2 participants