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

Missing dependency in PyPi package #3387

Closed
geimer opened this issue Jul 30, 2021 · 0 comments · Fixed by #3389
Closed

Missing dependency in PyPi package #3387

geimer opened this issue Jul 30, 2021 · 0 comments · Fixed by #3389
Labels
bug 🐛 dependencies 📦 Pull requests that update a dependency file

Comments

@geimer
Copy link

geimer commented Jul 30, 2021

Describe the bug
The CodeChecker PyPi package seems to be missing a dependency on thrift. While subcommands like log or analyze work as expected, running CodeChecker without any arguments throws annoying exceptions before printing usage information. I haven't tried running any of the web commands (where thrift seems to be used), but I expect some issues there as well.

CodeChecker version

CodeChecker analyzer version:
---------------------------------------------------------------
Kind                 | Version                                 
---------------------------------------------------------------
Base package version | 6.16.0                                  
Package build date   | 2021-06-04T10:38                        
Git commit ID (hash) | 8880695af939838b2e1e16b018c51ed66c6a5366
Git tag information  | 6.16                                    
---------------------------------------------------------------

CodeChecker web version:
------------------------------------------------------------------------
Kind                          | Version                                 
------------------------------------------------------------------------
Base package version          | 6.16.0                                  
Package build date            | 2021-06-04T10:38                        
Git commit ID (hash)          | 8880695af939838b2e1e16b018c51ed66c6a5366
Git tag information           | 6.16                                    
Server supported API (Thrift) | 6.40                                    
Client API (Thrift)           | 6.40                                    
------------------------------------------------------------------------

To Reproduce

$ python3 -m venv CodeChecker
$ . CodeChecker/bin/activate
$ pip install codechecker
[ ... pip output ... ]
$ CodeChecker
Couldn't import module for subcommand 'cmd'... ignoring.
Traceback (most recent call last):
  File "<root>/CodeChecker/lib/python3.9/site-packages/codechecker_common/cli.py", line 143, in main
    add_subcommand(subparsers, subcommand,
  File "<root>/CodeChecker/lib/python3.9/site-packages/codechecker_common/cli.py", line 38, in add_subcommand
    command_module = cmd_spec.loader.load_module(module_name)
  File "<frozen importlib._bootstrap_external>", line 469, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 969, in load_module
  File "<frozen importlib._bootstrap_external>", line 794, in load_module
  File "<frozen importlib._bootstrap>", line 274, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 711, in _load
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<root>/CodeChecker/lib/python3.9/site-packages/codechecker_client/cmd/cmd.py", line 19, in <module>
    from codechecker_api.codeCheckerDBAccess_v6 import ttypes
  File "<root>/CodeChecker/lib/python3.9/site-packages/codechecker_api/codeCheckerDBAccess_v6/ttypes.py", line 9, in <module>
    from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
ModuleNotFoundError: No module named 'thrift'
[ ... similar output for subcommands 'server' and 'store' ... ]
usage: CodeChecker [-h] {analyze,analyzer-version,analyzers,check,checkers,fixit,log,parse,version,web-version} ...
[ ... further usage output ... ]

Expected behaviour
Usage output w/o exceptions.

Desktop

  • OS: Linux
  • Browser: irrelevant
  • Version: irrelevant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 dependencies 📦 Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants