Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: object of type 'NoneType' has no len() when uploading coverage #641

Closed
danedmunds opened this issue Feb 19, 2025 · 6 comments · Fixed by #643
Closed

TypeError: object of type 'NoneType' has no len() when uploading coverage #641

danedmunds opened this issue Feb 19, 2025 · 6 comments · Fixed by #643
Assignees
Labels
Area: Report Upload Issues with pre-ingest report uploading Eng Area: CLI: General high High Priority Issues (to be fixed within 2 sprints)

Comments

@danedmunds
Copy link

danedmunds commented Feb 19, 2025

Hi there!

We've noticed that since release 10.1.0 went out that our codecov upload github action is failing with the following stack trace

 Traceback (most recent call last):
  File "codecov_cli/main.py", line 97, in <module>
  File "codecov_cli/main.py", line 93, in run
  File "click/core.py", line 1161, in __call__
  File "click/core.py", line 1082, in main
  File "click/core.py", line 1697, in invoke
  File "click/core.py", line 1443, in invoke
  File "click/core.py", line 788, in invoke
  File "click/decorators.py", line 33, in new_func
  File "codecov_cli/commands/upload_coverage.py", line 85, in upload_coverage
  File "click/core.py", line 788, in invoke
  File "codecov_cli/services/upload_coverage/__init__.py", line 51, in upload_coverage_logic
  File "codecov_cli/services/upload/__init__.py", line 102, in do_upload_logic
  File "codecov_cli/services/upload/upload_collector.py", line 169, in generate_upload_data
TypeError: object of type 'NoneType' has no len()

I suspect this is due to this change #625
I'm not very well versed in python but maybe len(None) isn't allowed?

@thomasrockhu-codecov thomasrockhu-codecov self-assigned this Feb 19, 2025
@thomasrockhu-codecov thomasrockhu-codecov added high High Priority Issues (to be fixed within 2 sprints) Eng Area: CLI: General Area: Report Upload Issues with pre-ingest report uploading labels Feb 19, 2025
@danedmunds
Copy link
Author

Thanks @joseph-sentry ! I didn't have the python chops to help out :)

webknjaz added a commit to webknjaz/ansible--awx-plugins that referenced this issue Feb 19, 2025
This is an upstream bug that is being fixed. This patch will have to
be reverted.

Refs:
* codecov/codecov-cli#641
* codecov/codecov-cli#643
@webknjaz
Copy link
Contributor

@thomasrockhu-codecov @joseph-sentry FYI, you should be able to mark the PyPI release as yanked to limit the damage.

@webknjaz
Copy link
Contributor

@thomasrockhu-codecov @joseph-sentry FYI, you should be able to mark the PyPI release as yanked to limit the damage.

UPD: I see it got yanked which is why there's no mass reports with this traceback.

@webknjaz
Copy link
Contributor

Oh, I'm still seeing this in CIs because the actions download 10.1.0 from another hosting: https://github.com/ansible/awx-plugins/actions/runs/13437325559/job/37542819968#step:24:41.

Interestingly, there's some API that returns HTML in place of JSON: https://github.com/ansible/awx-plugins/actions/runs/13437325559/job/37542819968#step:23:45. But it's probably being hit on the action side, not the CLI project...

@thomasrockhu-codecov any chance to change “latest” to the previous version there too?

Looks like the workaround would be use_pypi: true (bypasses integrity checks) or version: 10.0.1.

@thomasrockhu-codecov
Copy link
Contributor

@webknjaz hoping to get out a deploy that should fix this today

webknjaz added a commit to ansible/awx-plugins that referenced this issue Feb 20, 2025
This is a workaround for the bug reported @
codecov/codecov-cli#641.

It should be reverted once v10.1.1 is released with the fix.
@webknjaz
Copy link
Contributor

version: 10.0.1.

Apparently, it's version: v10.0.1: https://github.com/ansible/awx-plugins/actions/runs/13438098254/job/37545385409?pr=86#step:23:43.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Report Upload Issues with pre-ingest report uploading Eng Area: CLI: General high High Priority Issues (to be fixed within 2 sprints)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants