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

Offgridders not compatible with newest numpy version #158

Open
smartie2076 opened this issue Aug 16, 2021 · 0 comments
Open

Offgridders not compatible with newest numpy version #158

smartie2076 opened this issue Aug 16, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@smartie2076
Copy link
Collaborator

Installing Offgridders in a new environment and running it leads to following bug:

(D:\PycharmProjects\offgridders_ws\venv) D:\PycharmProjects\offgridders_ws>python Offgridders.py inputs/test_input_template.xlsx
11:29:41-INFO-Path for logging: ./micro_grid_design_logfile.log
11:29:41-INFO-
 Coded by: Martha M. Hoffmann
 Reiner Lemoine Institute (Berlin)


11:29:41-INFO-Performing simulations defined by file "inputs/test_input_template.xlsx"

11:29:41-INFO-Following project locations are evaluated: test_site
11:29:42-WARNING-Attributes "pv_cost_investment, pv_lifetime" defined in constant and sensitivity parameters. Only sensitivity parameter value will be used for sensitivity_exper
iment_s.
11:29:42-INFO-Parameters of sensitivity analysis: pv_cost_investment, pv_lifetime
11:29:42-INFO-NumExpr defaulting to 8 threads.
11:29:42-ERROR-You chose parameter 'fuel_price_change_annual' unequal zero. This calculation is still faulty and you should check the resulting fuel price. It would be better if
 you set your fuel price by hand.
11:29:42-INFO- The resulting fuel price is: 1.044592173358807
11:29:42-INFO-Randomized blackout timeseries for all combinations of blackout duration and frequency (1 experiments) will be generated.
Traceback (most recent call last):
  File "Offgridders.py", line 4, in <module>
    main()
  File "D:\PycharmProjects\offgridders_ws\src\cli.py", line 109, in main
    settings, parameters_constant_values, parameters_sensitivity, project_site_s
  File "D:\PycharmProjects\offgridders_ws\src\C_sensitivity_experiments.py", line 373, in get
    settings, number_of_project_sites, sensitivity_array_dict
  File "D:\PycharmProjects\offgridders_ws\src\C_sensitivity_experiments.py", line 1224, in overall_results_title
    title_overall_results = pd.DataFrame(columns=[CASE, PROJECT_SITE_NAME])
  File "D:\PycharmProjects\offgridders_ws\venv\lib\site-packages\pandas\core\frame.py", line 348, in __init__
    mgr = self._init_dict(data, index, columns, dtype=dtype)
  File "D:\PycharmProjects\offgridders_ws\venv\lib\site-packages\pandas\core\frame.py", line 451, in _init_dict
    nan_dtype)
  File "D:\PycharmProjects\offgridders_ws\venv\lib\site-packages\pandas\core\dtypes\cast.py", line 1196, in construct_1d_arraylike_from_scalar
    dtype = dtype.dtype
AttributeError: type object 'object' has no attribute 'dtype'

Uninstalling numpy==1.21.2 and installing numpy==1.19.4 fixed the issue.

@smartie2076 smartie2076 added the bug Something isn't working label Aug 16, 2021
@smartie2076 smartie2076 self-assigned this Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant