architecture-building-systems / CityEnergyAnalyst

The City Energy Analyst (CEA)
https://www.cityenergyanalyst.com/
MIT License
188 stars 59 forks source link

weather_helper: Could not find weather file: #3587

Closed christophwaibel closed 1 month ago

christophwaibel commented 1 month ago

Describe the bug When creating a new project scene, drawing outline on OSM, and click "create", it throws an error on weather file creation: "weather_helper: Could not find weather file:"

To Reproduce Steps to reproduce the behavior:

  1. create new project
  2. create new scene
  3. tick all the boxes (terrain, weather, etc)
  4. draw an outline on the OSM map
  5. click Create, wait, error

Expected behaviour expected no error

Screenshots

image

Hardware (please complete the following information):

Traceback (most recent call last):
  File "/Users/chwaibel/Documents/CityEnergyAnalyst/envs/cea/lib/python3.8/site-packages/cea/interfaces/dashboard/api/project.py", line 185, in post
    cea.api.weather_helper(config)
  File "/Users/chwaibel/Documents/CityEnergyAnalyst/envs/cea/lib/python3.8/site-packages/cea/api.py", line 60, in __call__
    self._runner.__call__(*args, **kwargs)
  File "/Users/chwaibel/Documents/CityEnergyAnalyst/envs/cea/lib/python3.8/site-packages/cea/api.py", line 38, in script_runner
    script_module.main(config)
  File "/Users/chwaibel/Documents/CityEnergyAnalyst/envs/cea/lib/python3.8/site-packages/cea/datamanagement/weather_helper.py", line 51, in main
    copy_weather_file(config.weather_helper.weather, locator)
  File "/Users/chwaibel/Documents/CityEnergyAnalyst/envs/cea/lib/python3.8/site-packages/cea/datamanagement/weather_helper.py", line 31, in copy_weather_file
    assert os.path.exists(source_weather_file), "Could not find weather file: {source_weather_file}".format(
AssertionError: Could not find weather file: 

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/chwaibel/Documents/CityEnergyAnalyst/envs/cea/lib/python3.8/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/chwaibel/Documents/CityEnergyAnalyst/envs/cea/lib/python3.8/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/Users/chwaibel/Documents/CityEnergyAnalyst/envs/cea/lib/python3.8/site-packages/flask_restx/api.py", line 402, in wrapper
    resp = resource(*args, **kwargs)
  File "/Users/chwaibel/Documents/CityEnergyAnalyst/envs/cea/lib/python3.8/site-packages/flask/views.py", line 109, in view
    return current_app.ensure_sync(self.dispatch_request)(**kwargs)
  File "/Users/chwaibel/Documents/CityEnergyAnalyst/envs/cea/lib/python3.8/site-packages/flask_restx/resource.py", line 41, in dispatch_request
    resp = meth(*args, **kwargs)
  File "/Users/chwaibel/Documents/CityEnergyAnalyst/envs/cea/lib/python3.8/site-packages/cea/interfaces/dashboard/api/project.py", line 187, in post
    raise Exception(f'{tool}_helper: {e}') from e
Exception: weather_helper: Could not find weather file: 
ShiZhongming commented 1 month ago

This has been fixed by @reyery. It will be reflected on v3.37.0