Skip to content

XBRL Extractor badzipfile error #251

Description

@broscious4peg

I am encountering a badzipfile error around the taxonomy file for FERC form 1. I am using the taxonomy file from the FERC website:
https://ecollection.ferc.gov/taxonomyHistory

Please let me know ASAP if you have any comments or ideas, and we can get to talking!

Error:

C:\Users\PEG Intern>xbrl_extract "C:\Users\PEG Intern\downloads\Puget Sound Files" --db-path "ferc1-2021-sample.sqlite" --taxonomy "C:\Users\PEG Intern\Downloads\Form 1_2023-04-01_976 (1).zip"
2024-08-01 15:18:27 [ INFO] catalystcoop.ferc_xbrl_extractor.xbrl:247 Parsing taxonomy from Form 1_2023-04-01_976/
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Users\PEG Intern\AppData\Local\Programs\Python\Python312\Scripts\xbrl_extract.exe_main
.py", line 7, in
File "C:\Users\PEG Intern\AppData\Local\Programs\Python\Python312\Lib\site-packages\ferc_xbrl_extractor\cli.py", line 156, in main
return run_main(**vars(parse()))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\PEG Intern\AppData\Local\Programs\Python\Python312\Lib\site-packages\ferc_xbrl_extractor\cli.py", line 134, in run_main
extracted = xbrl.extract(
^^^^^^^^^^^^^
File "C:\Users\PEG Intern\AppData\Local\Programs\Python\Python312\Lib\site-packages\ferc_xbrl_extractor\xbrl.py", line 58, in extract
table_defs = get_fact_tables(
^^^^^^^^^^^^^^^^
File "C:\Users\PEG Intern\AppData\Local\Programs\Python\Python312\Lib\site-packages\ferc_xbrl_extractor\xbrl.py", line 254, in get_fact_tables
taxonomy = Taxonomy.from_source(f, entry_point=taxonomy_entry_point)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\PEG Intern\AppData\Local\Programs\Python\Python312\Lib\site-packages\ferc_xbrl_extractor\taxonomy.py", line 251, in from_source
taxonomy, view = load_taxonomy_from_archive(taxonomy_source, entry_point)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\PEG Intern\AppData\Local\Programs\Python\Python312\Lib\site-packages\ferc_xbrl_extractor\arelle_interface.py", line 57, in load_taxonomy_from_archive
file_source = FileSource.openFileSource(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\PEG Intern\AppData\Local\Programs\Python\Python312\Lib\site-packages\arelle\FileSource.py", line 44, in openFileSource
filesource.openZipStream(sourceZipStream)
File "C:\Users\PEG Intern\AppData\Local\Programs\Python\Python312\Lib\site-packages\arelle\FileSource.py", line 351, in openZipStream
self.fs = zipfile.ZipFile(sourceZipStream, mode="r")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\PEG Intern\AppData\Local\Programs\Python\Python312\Lib\zipfile_init
.py", line 1349, in init
self.RealGetContents()
File "C:\Users\PEG Intern\AppData\Local\Programs\Python\Python312\Lib\zipfile_init
.py", line 1416, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions