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

Optimization error #157

Open
nesnoj opened this issue May 23, 2024 · 0 comments
Open

Optimization error #157

nesnoj opened this issue May 23, 2024 · 0 comments
Assignees
Labels
bug 🐞 Something isn't working

Comments

@nesnoj
Copy link
Contributor

nesnoj commented May 23, 2024

due to oemof-tabular version.

[2024-05-23 10:36:53,171: ERROR/ForkPoolWorker-15] Task django_oemof.simulation.simulate_scenario[0205b2b5-e16b-4e55-9daf-480a7eddcc84] raised unexpected: AttributeError("'int' object has no attribute 'iloc'")
Traceback (most recent call last):
  File "/venv/lib/python3.9/site-packages/django_oemof/simulation.py", line 46, in simulate_scenario
    simulation = models.Simulation.objects.get(scenario=scenario, parameters=parameters)  # pylint: disable=E1101
  File "/venv/lib/python3.9/site-packages/django/db/models/manager.py", line 87, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/venv/lib/python3.9/site-packages/django/db/models/query.py", line 637, in get
    raise self.model.DoesNotExist(
django_oemof.models.Simulation.DoesNotExist: Simulation matching query does not exist.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/venv/lib/python3.9/site-packages/celery/app/trace.py", line 450, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/venv/lib/python3.9/site-packages/celery/app/trace.py", line 731, in __protected_call__
    return self.run(*args, **kwargs)
  File "/venv/lib/python3.9/site-packages/django_oemof/simulation.py", line 55, in simulate_scenario
    termination_condition, input_data, results_data = simulate_energysystem(scenario, energysystem, lp_file)
  File "/venv/lib/python3.9/site-packages/django_oemof/simulation.py", line 199, in simulate_energysystem
    results_data = solph.processing.results(model)
  File "/venv/lib/python3.9/site-packages/oemof/solph/processing.py", line 272, in results
    df_dict = _disaggregate_tsa_result(df_dict, model.es.tsa_parameters)
  File "/venv/lib/python3.9/site-packages/oemof/solph/processing.py", line 512, in _disaggregate_tsa_result
    flow_dict[(storage, None)] = _calculate_soc_from_inter_and_intra_soc(
  File "/venv/lib/python3.9/site-packages/oemof/solph/processing.py", line 573, in _calculate_soc_from_inter_and_intra_soc
    inter_value = soc["inter"].iloc[i_offset + i]["value"]
AttributeError: 'int' object has no attribute 'iloc'
@nesnoj nesnoj added the bug 🐞 Something isn't working label May 23, 2024
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

2 participants