Giter Club home page Giter Club logo

Comments (5)

manusimidt avatar manusimidt commented on May 26, 2024

I get the following error when parsing the submission provided by you.

  File "E:\Programming\python\xbrl_parser\xbrl\taxonomy.py", line 215, in parse_taxonomy_url
    return parse_taxonomy(schema_path, cache, schema_url)
  File "E:\Programming\python\xbrl_parser\xbrl\taxonomy.py", line 343, in parse_taxonomy
    concept: Concept = c_taxonomy.concepts[concept_id]
KeyError: 'curr_S%C3%A3oTom%C3%A9Pr%C3%ADncipeDobra'

Seems like the parser uses somewhere the wrong file encoding.
curr_S%C3%A3oTom%C3%A9Pr%C3%ADncipeDobra should be curr_SãoToméPríncipeDobra

from py-xbrl.

shadow111 avatar shadow111 commented on May 26, 2024

do you have any idea on how to fix it please?

from py-xbrl.

manusimidt avatar manusimidt commented on May 26, 2024

I looked at the label linkbase again and found that this has nothing to do with the file encoding after all. The href attribute of the linkbase is simply url-encoded here.

<loc 
  xlink:href="currencies-2014-09-01.xsd#curr_S%C3%A3oTom%C3%A9Pr%C3%ADncipeDobra" 
  xlink:label="curr_SãoToméPríncipeDobra" 
  xlink:type="locator"/>

<labelArc 
  order="1.0" 
  xlink:arcrole="http://www.xbrl.org/2003/arcrole/concept-label" 
  xlink:from="curr_SãoToméPríncipeDobra" 
  xlink:to="curr_SãoToméPríncipeDobra_lbl" 
  xlink:type="arc"/>

<label 
  xlink:label="curr_SãoToméPríncipeDobra_lbl" 
  xlink:role="http://www.xbrl.org/2003/role/label" 
  xlink:type="resource" 
  xml:lang="en">São Tomé and Príncipe Dobra</label>

https://xbrl.frc.org.uk/cd/2014-09-01/currencies/currencies-2014-09-01-label.xml

from py-xbrl.

manusimidt avatar manusimidt commented on May 26, 2024

Now I am getting the same error you described earlier... 😄
Seems like this was a bug that was introduced in the latest versions of the package.

I will now check why the submission you provided fails with the error message KeyError: 'bus'.

from py-xbrl.

manusimidt avatar manusimidt commented on May 26, 2024

Found the issue. There is always this one report which is structured slightly different...
The creator of this report defines the namespace "bus" for every xml-element instead of just defining it once at the top of the submission.
The parser currently only uses the namespace-prefix map defined by the xmlns attributes at the root element. This is why it can'T find the corresponding namespace for the prefix 'bus'.
I will have a look at the error in the next few days and hopefully have enough time to fix it before the weekend.

image

from py-xbrl.

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.