cookiecutter-flask/cookiecutter-flask

pytest error

hjlarry opened this issue · 3 comments

I just create the startapp, and install the requirements/dev.txt, requirements/prod.txt, then run pytest:

(.venv) PS D:\myapptest> pytest
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>     config._do_configure()
INTERNALERROR>   File "D:\myapptest\.venv\lib\site-packages\_pytest\config\__init__.py", line 996, in _do_configure
INTERNALERROR>     self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR>   File "D:\myapptest\.venv\lib\site-packages\pluggy\_hooks.py", line 277, in call_historic
INTERNALERROR>     res = self._hookexec(self.name, self.get_hookimpls(), kwargs, False)
INTERNALERROR>   File "D:\myapptest\.venv\lib\site-packages\pluggy\_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "D:\myapptest\.venv\lib\site-packages\pluggy\_callers.py", line 60, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "D:\myapptest\.venv\lib\site-packages\pluggy\_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "D:\myapptest\.venv\lib\site-packages\pluggy\_callers.py", line 39, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "D:\myapptest\.venv\lib\site-packages\_pytest\debugging.py", line 68, in pytest_configure
INTERNALERROR>     import pdb
INTERNALERROR>   File "D:\myapptest\.venv\lib\site-packages\_pdbpp_path_hack\pdb.py", line 5, in <module>
INTERNALERROR>     exec(compile(f.read(), pdb_path, 'exec'))
INTERNALERROR>   File "D:\myapptest\.venv\lib\site-packages\pdb.py", line 23, in <module>
INTERNALERROR>     from fancycompleter import Completer, ConfigurableClass, Color
INTERNALERROR>   File "D:\myapptest\.venv\lib\site-packages\fancycompleter.py", line 7, in <module>
INTERNALERROR>     import rlcompleter
INTERNALERROR>   File "C:\Users\hejl\AppData\Local\Programs\Python\Python310\lib\rlcompleter.py", line 210, in <module>
INTERNALERROR>     import readline
INTERNALERROR>   File "D:\myapptest\.venv\lib\site-packages\readline.py", line 34, in <module>
INTERNALERROR>     rl = Readline()
INTERNALERROR>   File "D:\myapptest\.venv\lib\site-packages\pyreadline\rlmain.py", line 422, in __init__
INTERNALERROR>     BaseReadline.__init__(self)
INTERNALERROR>   File "D:\myapptest\.venv\lib\site-packages\pyreadline\rlmain.py", line 62, in __init__
INTERNALERROR>     mode.init_editing_mode(None)
INTERNALERROR>   File "D:\myapptest\.venv\lib\site-packages\pyreadline\modes\emacs.py", line 633, in init_editing_mode
INTERNALERROR>     self._bind_key('space',       self.self_insert)
INTERNALERROR>   File "D:\myapptest\.venv\lib\site-packages\pyreadline\modes\basemode.py", line 162, in _bind_key
INTERNALERROR>     if not callable(func):
INTERNALERROR>   File "D:\myapptest\.venv\lib\site-packages\pyreadline\py3k_compat.py", line 8, in callable
INTERNALERROR>     return isinstance(x, collections.Callable)
INTERNALERROR> AttributeError: module 'collections' has no attribute 'Callable'

I fix it by modify the .venv\lib\site-packages\pyreadline\py3k_compat.py file, but it seems not a good idea.

Project configuration:

Option Values
use_pipenv
  • yes
  • no
python_version
  • 3.10
  • 3.9
  • 3.8
  • 3.7
node_version
  • 16
  • 14
  • 12
use_heroku
  • yes
  • no
Are you using Docker to run the app?
  • yes
  • no
thuvh commented

I think this error come from pyreadline, look like this pr pyreadline/pyreadline#72

yes, the problem is:
this program use pdbpp, pdbpp use fancycompleter, fancycompleter use rlcompleter, rlcompleter use readline, readline use pyreadline
but the pyreadline last update is 7 years ago, so we should remove the pdbpp package?

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.