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
Runtime error for certain combinations of notebook names #565
Comments
Hi @ivanmkc Thanks for your report! I couldn't reproduce this though, I ran nbqa black \[UJ.1\].ipynb \[UJ.1\ NEW\].ipynb --nbqa-diff and it ran fine. Could you provide some more diagnostics please, and/or try to come up with a smaller reproducible example? |
Hi @ivanmkc - could you provide some more info please? I can't reproduce |
Sorry, busy with some deadlines. Let me retry again. |
no hurry 😄 |
Try these two notebooks. I ran: nbqa version is Error was:
If you run them separately, it strangely works fine. I wonder if it's confusing the two files when it attempts reconstructing them. Appreciate the help. |
Thanks @ivanmkc - I presume you also have some configuration in I'm not seeing any error here either. This works fine for me:
|
Sorry, I hand't used your full command - now I can reproduce the bug!
Thank you so much, I'll look into it! |
@all-contributors please add @ivanmkc for bugs |
I've put up a pull request to add @ivanmkc! 🎉 |
Wow that was quick! Will take a look. |
Oh I see, added as a contributor. Thanks! |
I just integrated this into our automated testing at https://github.com/GoogleCloudPlatform/ai-platform-samples btw. Works great! I removed the pre-commit integration as this bug was blocking but may consider adding it again. |
Ooh, I see the issue now! (Pdb) new_parent / new_stem
PosixPath('[UJ.1 NEW] AutoML Vision Image Classification (1)_93044693')
(Pdb) (new_parent / new_stem).with_suffix('.py')
PosixPath('[UJ.py') That's it, I'm ditching |
@ivanmkc thanks for your excellent report - have released 0.6.1, would appreciate it if you could confirm if it's fixed for you! |
Just tested it and it works fine. Thanks for looking into it so quickly. |
I have two notebooks:
For some reason, if you run them in the same nbqa command:
nbqa black \[UJ.1\].ipynb \[UJ.1\ NEW\].ipynb
You get the following error:
From debugging, if you change the name of
[UJ.1].ipynb
to[UJ.1.ipynb
, it works fine.Also, if you run them one at a time, it works fine.
The contents of the notebook matters. I tried with trivial content and it passed. I think there is some issue with the combination of the filenames and the replacement function.
Archive.zip
The text was updated successfully, but these errors were encountered: