question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when running query_scheduled_exchanges for AT-HU Total Commercial Schedules

See original GitHub issue

Hi,

I’m using query_scheduled_exchanges to download the Total Commercial Schedules between pairs of BiddingZones. For most pairs it works OK, but for the Austria-Hungary exchange (AT_HU, and the opposite direction), I’m getting an error:

ValueError: Length mismatch: Expected axis has 24 elements, new values have 93 elements

When I accessed data for this pair through the https://transparency.entsoe.eu/ web interface, I noticed the data is given in 15minutes intervals, so maybe this error is connected with this representation. However, for some other pairs with 15 minutes data, like DE-LU_BE, query_scheduled_exchanges works fine.

I run the entsoe-py on WinPython (WPy64-4741) with Pandas 1.1.5.

Any help to resolve that issue will be much appreciated.

Code to reproduce the error:

from entsoe import EntsoePandasClient
import pandas as pd

client = EntsoePandasClient(api_key="xxx")

start = pd.Timestamp('20201101', tz='UTC')
end = pd.Timestamp('20201102', tz='UTC')

totATHU = client.query_scheduled_exchanges('AT', 'HU', start=start, end=end)

Error:

Traceback (most recent call last):
  File "E:/dev/energy/code/mCEP_TP/tp_data/issue.py", line 9, in <module>
    trATHU = client.query_scheduled_exchanges('AT', 'HU', start=start, end=end)
  File "E:\dev\WPy64-3741\python-3.7.4.amd64\lib\site-packages\entsoe\entsoe.py", line 828, in year_wrapper
    frame = func(*args, start=_start, end=_end, **kwargs)
  File "E:\dev\WPy64-3741\python-3.7.4.amd64\lib\site-packages\entsoe\entsoe.py", line 1133, in query_scheduled_exchanges
    ts = parse_crossborder_flows(text)
  File "E:\dev\WPy64-3741\python-3.7.4.amd64\lib\site-packages\entsoe\parsers.py", line 183, in parse_crossborder_flows
    series = series.append(_parse_crossborder_flows_timeseries(soup))
  File "E:\dev\WPy64-3741\python-3.7.4.amd64\lib\site-packages\entsoe\parsers.py", line 521, in _parse_crossborder_flows_timeseries
    series.index = _parse_datetimeindex(soup)
  File "E:\dev\WPy64-3741\python-3.7.4.amd64\lib\site-packages\pandas\core\generic.py", line 5154, in __setattr__
    return object.__setattr__(self, name, value)
  File "pandas\_libs\properties.pyx", line 66, in pandas._libs.properties.AxisProperty.__set__
  File "E:\dev\WPy64-3741\python-3.7.4.amd64\lib\site-packages\pandas\core\series.py", line 424, in _set_axis
    self._mgr.set_axis(axis, labels)
  File "E:\dev\WPy64-3741\python-3.7.4.amd64\lib\site-packages\pandas\core\internals\managers.py", line 227, in set_axis
    f"Length mismatch: Expected axis has {old_len} elements, new "
ValueError: Length mismatch: Expected axis has 24 elements, new values have 93 elements

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
quintinnicolascommented, Feb 23, 2021

Hi, It seems to be a similar problem as the one mentioned in #97, the issue occurs when duplicates are found in the xml returned by ENTSOE. A simple workaround is proposed in commit #101.

0reactions
birnbaumcommented, Feb 24, 2021

Ah I see, thanks for the quick reply 😃 I’ll let you know if the fix works once the PR is merged!

Read more comments on GitHub >

github_iconTop Results From Across the Web

One of the group attributes failed your scheduling attempt.
Scheduling Error With PTO/ATO/Kit Model When Using Ship Sets: One of the group attributes failed your scheduling attempt. (Doc ID 466131.1).
Read more >
Your scheduled job failed because the results stored in cache ...
This commonly occurs when lots of schedules are set to run at the same time, are particularly large deliveries, or to more complex...
Read more >
"Scheduled item exceeded allowed run length" error when ...
1. The workaround is to change the scheduled task timeout "Maximum time to block other schedules" to 180 on the individual task:.
Read more >
Solved: Discovery AWS Error - ServiceNow Community
This message represents the maximum number of scheduled invocations of the same Discovery schedule. This prevents a backlog of scheduled runs if ...
Read more >
Can I use log files to troubleshoot schedules? - IBM
The schedule.log file provides information about service, business process ... If an error occurred when running a scheduled activity, the information about ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found