Code Monkey home page Code Monkey logo

Comments (5)

andmbg avatar andmbg commented on June 21, 2024 1

If I assign a Bundesanzeiger() object to a variable, then calling the get_reports('string') method of this object will go on to deliver results successfully whenever called and if string does not start with a number. Once I call it with a number at the beginning, this object will then also produce the error if subsequently called with a letter-first string. You can then regard this object as "broken". Any new instance of Bundesanzeiger will again function on non-number-starting strings. And to update: minus as first character works normally.

from deutschland.

wirthual avatar wirthual commented on June 21, 2024

Hi thank you for reporting.

Do you get the same error if the string does not start with a number?

from deutschland.

wirthual avatar wirthual commented on June 21, 2024

Interesting observation, good job!

Do you have an idea where this could originate from?

Here is a refactored version, might be worth to give it a shot if its working: #87

from deutschland.

timtensor avatar timtensor commented on June 21, 2024

Hi ,there is there a change in output. I have been trying to run the API but i get the following output , by printing out the data.key(). I am trying to execute it on google colab enviroment
Output
dict_keys(['5ba681c9115aaecdafc8c38bb108c3db', '4b2f77bf02e816bb8499faf15caefedd', '2634689c43cb89a694dcdbb4cab78e02', '292ca3b5f4810955aca539406eeb76cf', 'c61cd2984dae315fafddb9734ebe62f6', '2abad8c6b58e34b6d30f338fe26ec2f2', '67ce34620f61384c3cf57c0e27e2b6df', 'd745f647588351fbe83e28da65805f22', 'dc4e92d299d36b81f5b9396b0c086835', '48447cfb08c917d023b1eca9c5b2600a', '0321a5615eecb0eb209e755c467b9355', '86a6887e3dcfcde4e74137f90e1c418c', 'e2ffcd430071329d49e7c6cdc41321db', '0593e7ae90f18e1729d582019682aceb', 'ea23a1ab5abbe17edf5863b60821d6e6', '15c2d9e390f07feeac1dd8d7ca3c35b8', '0faf2776804538ca0ccfba9eae40aed4', '832955731452a656644742ff77f67631', '7a0874b3ef79b15f7a88c14a21e13c3c', '07d3bf28953ce5354e0bf502b1593d69'])

expected output
# dict_keys(['Jahresabschluss zum Geschäftsjahr vom 01.01.2020 bis zum 31.12.2020', 'Konzernabschluss zum Geschäftsjahr vom 01.01.2020 bis zum 31.12.2020\nErgänzung der Veröffentlichung vom 04.06.2021',

from deutschland.

wirthual avatar wirthual commented on June 21, 2024

Hi tim,

regarding the keys in the dictionary, the output changed in a more recent version to use hashes instead of the names. This is due to multiple entries for a name. If you want to access the data you used to see in the previous version as key, you can simply access the data with:

from deutschland.bundesanzeiger import Bundesanzeiger
ba = Bundesanzeiger()
data = ba.get_reports('dfki')
for hash in data.keys():
   print(data[hash]["name"])

Which results in this example in:

Jahresabschluss zum Geschäftsjahr vom 01.01.2021 bis zum 31.12.2021
Jahresabschluss zum Geschäftsjahr vom 01.01.2020 bis zum 31.12.2020
Jahresabschluss zum Geschäftsjahr vom 01.01.2019 bis zum 31.12.2019
Corporate Governance Bericht 2020
Corporate Governance Bericht 2019
Corporate Governance Bericht 2019
Einladung zur ordentlichen Hauptversammlung
Honorarkonsularische Vertretung von Frankreich in Aachen
Corporate Governance Bericht 2018
Corporate Governance Bericht 2018
Corporate Governance Bericht 2017
Einladung zur ordentlichen Hauptversammlung
Honorarkonsularische Vertretung von Frankreich in Aachen
Jahresbericht zum 30. Juni 2008
Hauptversammlung

You can see some entries names are duplicated which is why the change to another key was necessary.

from deutschland.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.