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

Using PV pool in locations without PV cause error #1130

Open
shsms opened this issue Dec 11, 2024 · 4 comments
Open

Using PV pool in locations without PV cause error #1130

shsms opened this issue Dec 11, 2024 · 4 comments
Labels
priority:high Address this as soon as possible type:bug Something isn't working

Comments

@shsms
Copy link
Contributor

shsms commented Dec 11, 2024

What happened?

2024-12-10T09:31:59+0100 ERROR    frequenz.sdk._internal._asyncio:50: Restarting after exception
Traceback (most recent call last):
  File "/frequenz-app-edge/.venv2/lib/python3.11/site-packages/frequenz/sdk/_internal/_asyncio.py", line 48, in run_forever
    await async_callable()
  File "/frequenz-app-edge/.venv2/lib/python3.11/site-packages/frequenz/sdk/timeseries/pv_pool/_system_bounds_tracker.py", line 108, in _run
    pv_data_rx = merge(
                 ^^^^^^
  File "/frequenz-app-edge/.venv2/lib/python3.11/site-packages/frequenz/channels/_merge.py", line 92, in merge
    raise ValueError("At least one receiver must be provided")
ValueError: At least one receiver must be provided

This was from a setup without PV inverters.

What did you expect instead?

It shouldn't crash or cause errors. However, the propose_power method could print a warning when there are no components.

Affected version(s)

No response

Affected part(s)

Data pipeline (part:data-pipeline)

Extra information

No response

@shsms shsms added priority:❓ We need to figure out how soon this should be addressed type:bug Something isn't working labels Dec 11, 2024
@keywordlabeler keywordlabeler bot added the part:data-pipeline Affects the data pipeline label Dec 11, 2024
@shsms shsms added priority:high Address this as soon as possible and removed priority:❓ We need to figure out how soon this should be addressed part:data-pipeline Affects the data pipeline labels Dec 11, 2024
@ela-kotulska-frequenz
Copy link
Contributor

ela-kotulska-frequenz commented Dec 11, 2024

Unfortunately it looks like creating pv pool causes this errors.

self._pv_pool = microgrid.new_pv_pool(priority=priority)

It starts other actors and one of them subscribes for system bounds and frequenz/sdk/timeseries/pv_pool/_system_bounds_tracker.py/_system_bounds_tracker. raises error

These actors started when I create pv_pool:

frequenz.sdk.actor._actor:86: Actor PowerDistributingActor[131823700983008]: Started.
frequenz.sdk.actor._actor:86: Actor PowerManagingActor[131823700983680]: Started.
frequenz.sdk.actor._actor:86: Actor DataSourcingActor[131823701247040]: Started.
frequenz.sdk.actor._actor:86: Actor ComponentMetricsResamplingActor[131823701247328]: Started.

@llucax
Copy link
Contributor

llucax commented Dec 18, 2024

However, the propose_power method could print a warning when there are no components.

I think we should just raise an exception if you are creating a PV pool and there are no PVs. I don't see any reason to create a phantom PV pool.

Although when we start refreshing the component graph, this would make sense.

@shsms
Copy link
Contributor Author

shsms commented Dec 18, 2024

I think we should just raise an exception if you are creating a PV pool and there are no PVs. I don't see any reason to create a phantom PV pool.

People would want to build formulas with pv_pool.power, etc. without having to worry about whether there are PVs at a location. So we should support this.

@llucax
Copy link
Contributor

llucax commented Dec 19, 2024

True. Tricky, because in that case having a warning would be annoying and spammy, because it might be a perfectly normal situation that is emitting spurious warnings. I guess we'll have to rely on a good monitoring system that allow us to filter out those warnings in locations where the warning is expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:high Address this as soon as possible type:bug Something isn't working
Projects
Status: To do
Development

No branches or pull requests

3 participants