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

Crash in retrieving crate data #7

Closed
abasu2 opened this issue Oct 2, 2024 · 2 comments
Closed

Crash in retrieving crate data #7

abasu2 opened this issue Oct 2, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@abasu2
Copy link
Collaborator

abasu2 commented Oct 2, 2024

The code seems to crash when trying to fetch the number of stars and forks for crate bigint v4.4.3 and some others. Here's my traceback:

Traceback (most recent call last):
  File "/home/abasu/reu/cargo-sherlock/solver.py", line 182, in <module>
    main()
  File "/home/abasu/reu/cargo-sherlock/solver.py", line 179, in main
    complete_analysis(crate)
  File "/home/abasu/reu/cargo-sherlock/solver.py", line 160, in complete_analysis
    summary = memoized_crate_analysis(crate)
  File "/home/abasu/reu/cargo-sherlock/solver.py", line 76, in memoized_crate_analysis
    metadata = crate_data.get_crate_metadata(crate)
  File "/home/abasu/reu/cargo-sherlock/helpers/crate_data.py", line 25, in get_crate_metadata
    logger.logger(crate.name, crate.version, "exp")
  File "/home/abasu/reu/cargo-sherlock/helpers/logger.py", line 828, in logger
    information = get_stars_and_forks(crate_name)
  File "/home/abasu/reu/cargo-sherlock/helpers/logger.py", line 58, in get_stars_and_forks
    repository_url = repository_url.rstrip('.git')
AttributeError: 'NoneType' object has no attribute 'rstrip'
@abasu2 abasu2 added the bug Something isn't working label Oct 2, 2024
@muhammad-hassnain
Copy link
Contributor

Getting Logging Information About Crate bigint-4.4.3...
This crate has been flagged by RustSec.
This crate has not been audited by any organization.
Failed to retrieve data: 404
Logging information for bigint-4.4.3:
defaultdict(<class 'list'>,
{'audits': [],
'dependencies': [CrateVersion(name='byteorder', version='1.5.0'),
CrateVersion(name='crunchy', version='0.2.2')],
'developers': ['NikVolf', 'github:paritytech:core-devs'],
'downloads': 706366,
'failed_rudra': True,
'forks': 0,
'in_rust_sec': True,
'num_side_effects': 0,
'stars': 0})

It does not crash on my end, I do see a 404, which leads to 0 stars and forks. I am investigating that.

@muhammad-hassnain
Copy link
Contributor

The error was due to parsing issue on the github repo url. It has been fixed.

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

No branches or pull requests

2 participants