Skip to content

test_epidata_geoModificationGermany is failing #1079

@MariamaJ

Description

@MariamaJ

Bug description

Unittesting epidata_test fails. The issue is related to test: test_epidata_geoModificationGermany.py. The issue came after merging 916-ingest-epidata-into-the-loki-database. Function which require to be checked is: memilio.epidata.getDataIntoPandasDataFrame.download_file

Version

Github (CI, Actions, etc.)

To reproduce

Run the unittesting

python -m unittest

Relevant log output

Info: Data has been written to /home/Mobility/mobility.txt
.
======================================================================
ERROR: test_get_nuts3_county_id_map (memilio.epidata_test.test_epidata_geoModificationGermany.Test_geoModificationGermany)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/mja_hzi/LOKICODE/memilio/pycode/memilio-epidata/memilio/epidata_test/test_epidata_geoModificationGermany.py", line 403, in test_get_nuts3_county_id_map
    nuts_key_dict = geoger.get_nuts3_county_id_map()
  File "/Users/mja_hzi/LOKICODE/memilio/pycode/memilio-epidata/memilio/epidata/geoModificationGermany.py", line 348, in get_nuts3_county_id_map
    county_table = get_official_county_table()
  File "/Users/mja_hzi/LOKICODE/memilio/pycode/memilio-epidata/memilio/epidata/geoModificationGermany.py", line 320, in get_official_county_table
    file = gd.download_file(url_counties, 1024, None,
  File "/Users/mja_hzi/LOKICODE/memilio/pycode/memilio-epidata/memilio/epidata/getDataIntoPandasDataFrame.py", line 209, in download_file
    file_size = int(req.headers.get('content-length'))
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

======================================================================
ERROR: test_get_official_county_table (memilio.epidata_test.test_epidata_geoModificationGermany.Test_geoModificationGermany)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/mja_hzi/LOKICODE/memilio/pycode/memilio-epidata/memilio/epidata_test/test_epidata_geoModificationGermany.py", line 395, in test_get_official_county_table
    county_table = geoger.get_official_county_table()
  File "/Users/mja_hzi/LOKICODE/memilio/pycode/memilio-epidata/memilio/epidata/geoModificationGermany.py", line 320, in get_official_county_table
    file = gd.download_file(url_counties, 1024, None,
  File "/Users/mja_hzi/LOKICODE/memilio/pycode/memilio-epidata/memilio/epidata/getDataIntoPandasDataFrame.py", line 209, in download_file
    file_size = int(req.headers.get('content-length'))
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

----------------------------------------------------------------------
Ran 122 tests in 91.295s

FAILED (errors=2, skipped=1)

Add any relevant information, e.g. used compiler, screenshots.

No response

Checklist

  • Attached labels, especially loc:: or model:: labels.
  • Linked to project

Metadata

Metadata

Assignees

Labels

class::bugBugs found in the softwareloc::data handlingThis issue concerns any kind of data handling.

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions