You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/builds/codeandsupply/survey-team/comp-survey-2022-results/notebooks/__main__.py", line 46, in <module>
for _ in executor.map(
File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 621, in result_iterator
yield _result_or_cancel(fs.pop())
File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 319, in _result_or_cancel
return fut.result(timeout)
File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 451, in result
return self.__get_result()
File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/builds/codeandsupply/survey-team/comp-survey-2022-results/notebooks/__main__.py", line 30, in execute_viz_notebook
pm.execute_notebook(
File "/builds/codeandsupply/survey-team/comp-survey-2022-results/.pipenv/venvs/comp-survey-2022-results-JkxXsIH4/lib/python3.10/site-packages/papermill/execute.py", line 93, in execute_notebook
nb = parameterize_notebook(
File "/builds/codeandsupply/survey-team/comp-survey-2022-results/.pipenv/venvs/comp-survey-2022-results-JkxXsIH4/lib/python3.10/site-packages/papermill/parameterize.py", line 90, in parameterize_notebook
param_content = translate_parameters(kernel_name, language, parameters, comment)
File "/builds/codeandsupply/survey-team/comp-survey-2022-results/.pipenv/venvs/comp-survey-2022-results-JkxXsIH4/lib/python3.10/site-packages/papermill/translators.py", line 589, in translate_parameters
return papermill_translators.find_translator(kernel_name, language).codify(parameters, comment)
File "/builds/codeandsupply/survey-team/comp-survey-2022-results/.pipenv/venvs/comp-survey-2022-results-JkxXsIH4/lib/python3.10/site-packages/papermill/translators.py", line 193, in codify
fm = black.FileMode(string_normalization=False)
AttributeError: module 'black' has no attribute 'FileMode'
The thing is that is works transiently. It's working installed locally and works on a clean cache on our CI, but not on a reused cache, which is literally just the contents of the pip and pipenv cache, e.g.
Relevant .gitlab-ci.yaml section
variables:
# tells Pipenv where to setup venvs
WORKON_HOME: .pipenv/venvs
# tells Pipenv where to put its cache
PIPENV_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pipenv"
# tells Pip where to put its cache
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
key:
# keeps jobs' cache separate
prefix: $CI_JOB_NAME
# invalidate the cache when these files change
files:
- Pipfile.lock
# cache these directories
paths:
- .cache/pip
- .cache/pipenv
It still seems to be possible that a misshapen black installation can throw a wrench in papermill, esp. when its usage is optional and allowed to fail if the import fails. I'd like for papermill not to exit in this case.
🐛 Bug
papermill is failing against black 22.10.0:
The thing is that is works transiently. It's working installed locally and works on a clean cache on our CI, but not on a reused cache, which is literally just the contents of the pip and pipenv cache, e.g.
Relevant .gitlab-ci.yaml section
It still seems to be possible that a misshapen
black
installation can throw a wrench in papermill, esp. when its usage is optional and allowed to fail if the import fails. I'd like for papermill not to exit in this case.pipenv graph output
The text was updated successfully, but these errors were encountered: