Application test fail on file content-length query

Open
#485 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
backend

Research direction

Start at Source/utils/filing.py:75 in downloadZhangDB and compare the failing GitHub Actions run with the local behavior described in the issue. Reproduce the application test failure and verify that downloading files no longer crashes when the response headers differ from the local case.

Written by the indexing model from the issue text.

Description

@doizuc I think we have encountered this before. When downloading files, the query works fine locally but crashes when GitHub>Actions>Application Tests call it:

https://github.com/nasa/HyperCP/actions/runs/30582145602/job/91004754378#step:6:135

File "/Users/runner/work/HyperCP/HyperCP/Source/utils/filing.py", line 75, in downloadZhangDB
    download_session.head(url).headers["Content-length"]
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/Users/runner/miniconda3/envs/hypercp/lib/python3.14/site-packages/requests/structures.py", line 65, in __getitem__
    return self._store[key.lower()][1]
           ~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'content-length'

Do you recall how we fixed this before?

Dominant language
Python
Stars
53
Forks
33
Avg merge
1d 3h
Merged PRs (30d)
2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nasa/HyperCP

All issues in nasa/HyperCP

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.