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

[BUG] KeyError: 'displayName' #119

Open
DmytroLitvinov opened this issue May 24, 2022 · 3 comments
Open

[BUG] KeyError: 'displayName' #119

DmytroLitvinov opened this issue May 24, 2022 · 3 comments

Comments

@DmytroLitvinov
Copy link

Additional context

$ jake ddt --clear-cache
                   ___           ___           ___     
       ___        /  /\         /  /\         /  /\    
      /__/\      /  /::\       /  /:/        /  /::\   
      \__\:\    /  /:/\:\     /  /:/        /  /:/\:\  
  ___ /  /::\  /  /::\ \:\   /  /::\____   /  /::\ \:\ 
 /__/\  /:/\/ /__/:/\:\_\:\ /__/:/\:::::\ /__/:/\:\ \:\
 \  \:\/:/~~  \__\/  \:\/:/ \__\/~|:|~~~~ \  \:\ \:\_\/
  \  \::/          \__\::/     |  |:|      \  \:\ \:\  
   \__\/           /  /:/      |  |:|       \  \:\_\/  
                  /__/:/       |__|:|        \  \:\    
                  \__\/         \__\|         \__\/    
                                                  
            /)                     /)             
        _/_(/    _     _  __   _  (/_   _         
 o   o  (__/ )__(/_   /_)_/ (_(_(_/(___(/_ o   o  
                                                  
                                                  
Jake Version: 1.4.5
Put your Python dependencies in a chokehold
🐍 Collected 262 packages from your environment ━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Querying OSS Index for details on your packages ━━━━━╸               30% 0:00:01
Sanity checking...                                                    0% -:--:--
Traceback (most recent call last):
  File "/builds/g4506/gryps/gryps_ch/venv/bin/jake", line 8, in <module>
    sys.exit(main())
  File "/builds/g4506/gryps/gryps_ch/venv/lib/python3.8/site-packages/jake/app.py", line 124, in main
    JakeCmd().execute()
  File "/builds/g4506/gryps/gryps_ch/venv/lib/python3.8/site-packages/jake/app.py", line 69, in execute
    exit_code: int = command.execute(arguments=self._arguments)
  File "/builds/g4506/gryps/gryps_ch/venv/lib/python3.8/site-packages/jake/command/__init__.py", line 45, in execute
    return self.handle_args()
  File "/builds/g4506/gryps/gryps_ch/venv/lib/python3.8/site-packages/jake/command/oss.py", line 78, in handle_args
    oss_index_results = oss.get_component_report(
  File "/builds/g4506/gryps/gryps_ch/venv/lib/python3.8/site-packages/ossindex/ossindex.py", line 59, in get_component_report
    return self._get_results(packages=packages)
  File "/builds/g4506/gryps/gryps_ch/venv/lib/python3.8/site-packages/ossindex/ossindex.py", line 146, in _get_results
    results = results + self._make_oss_index_component_report_call(packages=chunk)
  File "/builds/g4506/gryps/gryps_ch/venv/lib/python3.8/site-packages/ossindex/ossindex.py", line 161, in _make_oss_index_component_report_call
    results = json.loads(response.text, cls=_OssIndexResponseDecoder)
  File "/usr/local/lib/python3.8/json/__init__.py", line 370, in loads
    return cls(**kw).decode(s)
  File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.8/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
  File "/builds/g4506/gryps/gryps_ch/venv/lib/python3.8/site-packages/ossindex/ossindex.py", line 32, in _to_model
    return Vulnerability.from_json(o)
  File "/builds/g4506/gryps/gryps_ch/venv/lib/python3.8/site-packages/ossindex/model.py", line 48, in from_json
    display_name=o['displayName'],
KeyError: 'displayName'
@bhamail
Copy link
Contributor

bhamail commented Jun 2, 2022

@DmytroLitvinov I think the discussion here will help: #118
If the issue persists, please comment here.

@madpah
Copy link
Collaborator

madpah commented Jun 9, 2022

@DmytroLitvinov - given OSS Index has introduced breaking changes (see #121) - can you look to see if:

  1. You are still seeing this issue (we are aware an OSS Index issue was resolved last week)
  2. If you are with jake 1.4.5, can you look at using the latest jake to confirm?

@madpah madpah removed the bug Something isn't working label Jun 9, 2022
@DmytroLitvinov
Copy link
Author

Hi @madpah ,
Yes, it works.

The only left issue related to ecosystem packages is that one of package strict requires PyYAML<6. Here is a related issue sonatype-nexus-community/ossindex-python#8. My proposal is still actual for now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants