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 running nbblack #2

Open
ffs97 opened this issue Feb 20, 2020 · 0 comments
Open

Error running nbblack #2

ffs97 opened this issue Feb 20, 2020 · 0 comments

Comments

@ffs97
Copy link

ffs97 commented Feb 20, 2020

  • nbblack version: nbblack, version 0+untagged.9.gc36d102
  • Python version: 3.7.4
  • Operating System: Arch Linux

Description

I faced an issue while running nbblack from the terminal on a simple notebook and faced an error reported below.

What I Did

> nbblack notebook.ipynb

Traceback (most recent call last):
  File "/home/fat-fighter/software/conda/envs/ml/bin/nbblack", line 11, in <module>
    load_entry_point('nbblack==0+untagged.9.gc36d102', 'console_scripts', 'nbblack')()
  File "/home/fat-fighter/software/conda/envs/ml/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/fat-fighter/software/conda/envs/ml/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/fat-fighter/software/conda/envs/ml/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/fat-fighter/software/conda/envs/ml/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/fat-fighter/software/conda/envs/ml/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/fat-fighter/software/conda/envs/ml/lib/python3.7/site-packages/nbblack-0+untagged.9.gc36d102-py3.7.egg/nbblack/cli.py", line 150, in main
    nb = blacken_notebook_contents(notebook.read())
AttributeError: 'PosixPath' object has no attribute 'read'

Would really appreciate some help with this. Also, thanks for creating this plugin. It is my first time using it so I might be using it incorrectly.

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

1 participant