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

KeyError: 'anlageneeggeosolarthermiegrubenklaerschlammdruckentspannung' #571

Closed
AhmadShelbayeh opened this issue Oct 1, 2024 · 5 comments

Comments

@AhmadShelbayeh
Copy link

AhmadShelbayeh commented Oct 1, 2024

Description of the issue

Hey guys, I am getting a key error when downloading the Bulk data.
Code:
from open_mastr import Mastr
db = Mastr()
date = datetime.now().strftime('20230401')
db.download(method='bulk', data=["wind", "market", "permit", "deleted_units"], date=date)

KeyError: 'anlageneeggeosolarthermiegrubenklaerschlammdruckentspannung'

@FlorianK13
could you please help me?

Ideas of solution

Context and Environment

Version used: 0.14.3. and 0.14.4.
Environment setup and (python) version: 3.11. & 3.12.

@FlorianK13
Copy link
Member

Hi @AhmadShelbayeh, the data model of MaStR is constantly changing. So with the 0.14.4 version of today you are only able to parse current versions of MaStR. You can check which version of open-mastr was the current version at 2023-04-01 by going to https://github.com/OpenEnergyPlatform/open-MaStR/releases and install this version manually.

@AhmadShelbayeh
Copy link
Author

AhmadShelbayeh commented Oct 2, 2024

Hi @FlorianK13,

Thank you for your support.

I’m currently trying to download data for a previous date, such as 01.04.2023. However, I encountered the following error:

OSError: There exists no file for given date. MaStR can only be downloaded from the website if today's date is given.

It seems that I must manually download the data for 01.04.2023 from the MaStR website at the following link: https://www.marktstammdatenregister.de/MaStR/Datendownload and save it in this folder:
open-MaStR\data\xml_download.

Note: suitable version: 0.13.0
Could you please let me know if there’s an alternative method to achieve this?

Additionally, I am interested in downloading data dating back to 01.01.2018 or 01.01.2019, i.e., data prior to 01.04.2023. Could you advise on how this can be done?

Thank you in advance for your help! @FlorianK13

@FlorianK13
Copy link
Member

Could you please let me know if there’s an alternative method to achieve this?

Hi @AhmadShelbayeh, no there is no alternative method. However you can achieve this with the manual steps: You need to manually download the file and name it 'Gesamtdatendownload_20230401' and then set the date parameter in the .download() method to the date of download, ie '20230401'.

@FlorianK13
Copy link
Member

Additionally, I am interested in downloading data dating back to 01.01.2018 or 01.01.2019, i.e., data prior to 01.04.2023. Could you advise on how this can be done?

No, there is no way of achieving this, as far as I know. Within the open-mastr package, we also can only download the files available at marktstammdatenregister.de

@AhmadShelbayeh
Copy link
Author

Hi @FlorianK13 ,

I noticed that the oldest version of the Gesamtdatendownload available on the website is from 01.04.2023. Would you happen to have any versions from before that date on the server? If so, could you kindly provide them to me?

Thanks in advance for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants