Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

[BUG]: TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType' #125

Closed
1 task done
johnjelinek opened this issue Dec 6, 2022 · 5 comments · Fixed by #127
Closed
1 task done
Labels
bug Something isn't working

Comments

@johnjelinek
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

This repo is impacted by this bug: snyk-labs/pysnyk#162. To resolve, I modified requirements.txt and pinned an older version of mashumaro:

pysnyk==0.9.3
PyGithub==1.47
requests==2.28.0
urllib3==1.26.5
mashumaro==3.1.1

Steps To Reproduce

./snyk_scm_refresh.py --dry-run

Additional Information

No response

@johnjelinek johnjelinek added the bug Something isn't working label Dec 6, 2022
@github-actions
Copy link

github-actions bot commented Dec 6, 2022

Issue: CS-179

@nando-ft
Copy link

was this solved already ?

@johnjelinek
Copy link
Author

No. snyk-labs/pysnyk#165

@scott-es
Copy link
Contributor

we will bump pysnyk once the upstream issue is resolved

@abower-digimarc
Copy link

I also have this issue. We have a number of repos that do not have Dependencies. e.g, terraform only repositories.

Note the call stack:

Retrieving Snyk Repos for 1 org(s)
File "", line 78, in from_dict
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/runner/work/sre-snyk-scm-sync/sre-snyk-scm-sync/./snyk_scm_refresh.py", line 60, in
run()
File "/home/runner/work/sre-snyk-scm-sync/sre-snyk-scm-sync/app/app.py", line 48, in run
snyk_repos = get_snyk_repos_from_snyk_orgs(snyk_orgs, common.ARGS)
File "/home/runner/work/sre-snyk-scm-sync/sre-snyk-scm-sync/app/utils/snyk_helper.py", line 45, in get_snyk_repos_from_snyk_orgs
snyk_projects = build_snyk_project_list(snyk_orgs, ARGS)
File "/home/runner/work/sre-snyk-scm-sync/sre-snyk-scm-sync/app/utils/snyk_helper.py", line 113, in build_snyk_project_list
snyk_projects = snyk_org.projects.all()
File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/snyk/managers.py", line 172, in all
return self._query()
File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/snyk/managers.py", line 163, in _query
projects.append(self.klass.from_dict(project_data))
File "", line 85, in from_dict
mashumaro.exceptions.InvalidFieldValue: Field "totalDependencies" of type int in Project has invalid value None

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants