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

error when executing notebook with papermill 2.0.0 and higher #498

Open
VDEHans opened this issue Apr 30, 2020 · 13 comments
Open

error when executing notebook with papermill 2.0.0 and higher #498

VDEHans opened this issue Apr 30, 2020 · 13 comments

Comments

@VDEHans
Copy link

VDEHans commented Apr 30, 2020

When running a jupiter notebook with papermill 2.0.0 following error is generated:
Writing grammar tables to /home/AD/hvd1v2w/.cache/black/19.10b0/Grammar3.7.7.final.0.pickle
Writing failed: [Errno 2] No such file or directory: '/home/AD/hvd1v2w/.cache/black/19.10b0/tmp6jo8l_ml'
Generating grammar tables from /home/AD/hvd1v2w/.conda/envs/stuks-productiviteit-refactor/lib/python3.7/site-packages/blib2to3/PatternGrammar.txt
Writing grammar tables to /home/AD/hvd1v2w/.cache/black/19.10b0/PatternGrammar3.7.7.final.0.pickle
Writing failed: [Errno 2] No such file or directory: '/home/AD/hvd1v2w/.cache/black/19.10b0/tmpy8vr4ksk'

Except reverting to a previous version of papermill is there a fix for this ?

@MSeal
Copy link
Member

MSeal commented Apr 30, 2020

What python version are you using? This looks like a low-level conda packaging issue trying to load the black library. I expect building a new conda environment or forcing a reinstall of black will fix the issue here.

@MSeal
Copy link
Member

MSeal commented Apr 30, 2020

Oh also I believe the 2.0 build had an issue with the black dependency -- try using 2.1.0 or 2.1.1 instead of 2.0.0.

@VDEHans
Copy link
Author

VDEHans commented May 7, 2020

Python version used: 3.7.7
Tried with papermill 2.0.0, 2.1.0 and 2.1.1
all versions generated the same error:
image

@MSeal
Copy link
Member

MSeal commented May 7, 2020

That looks like something wrong in black. Perhaps this issue: psf/black#1223. What version of black are you using? Try upgrading that if it's an older version.

@VDEHans
Copy link
Author

VDEHans commented May 7, 2020

using latest black version 19.10b0

@MSeal
Copy link
Member

MSeal commented May 7, 2020

Alright. I'd open an issue on the https://github.com/python/black repo. I'm not sure why this error is occurring for you but I can't reproduce it.

As a last try for fixing from my idea pool is to try creating a new conda environment and reinstalling everything there. Conda can sometimes get a damaged installation that causes issues with more complicated recipes.

@nielsgl
Copy link

nielsgl commented May 27, 2020

I'm having the same error on a clean install with the same black version as @VDEHans .

@MSeal
Copy link
Member

MSeal commented May 29, 2020

@willingc Do you think you could get some eyes from black to look at the issues made there on this topic?

@ruxi
Copy link

ruxi commented May 31, 2020

Also having the same error.

papermill 2.1.0
Python 3.8.2

@MSeal
Copy link
Member

MSeal commented Jun 1, 2020

Maybe try an older version of black -- I'm waiting to hear from the issue linked above because there's not a lot papermill can do about fixing the error afaik.

@nielsgl
Copy link

nielsgl commented Jun 2, 2020

I got the error to go away after generating the black cache. No need to downgrade black.

For me it was running

black <PATH TO BLACK>/lib/python3.8/site-packages/black.py

and it works like a charm :)

@robomotic
Copy link

I am having the same issue btw.

@robomotic
Copy link

If I run as you suggested: black /opt/conda/lib/python3.9/site-packages/black/cache.py just before I need to convert via the tool. No errors are displayed.

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

6 participants