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:root:__call__() missing 1 required positional argument: 'value' #22

Open
Yuan-Meng opened this issue Apr 12, 2020 · 2 comments
Open

Comments

@Yuan-Meng
Copy link

Yuan-Meng commented Apr 12, 2020

When I ran %reload_ext lab_black in my Jupyterlab, I got an error message:

ERROR:root:__call__() missing 1 required positional argument: 'value'
Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.7/site-packages/lab_black.py", line 218, in format_cell
    formatted_code = _format_code(cell)
  File "/opt/anaconda3/lib/python3.7/site-packages/lab_black.py", line 29, in _format_code
    return format_str(src_contents=code, mode=FileMode())
TypeError: __call__() missing 1 required positional argument: 'value'

Screen Shot 2020-04-11 at 6 15 39 PM

Here's line 29:
Screen Shot 2020-04-11 at 6 22 19 PM

Here's line 218:
Screen Shot 2020-04-11 at 6 22 28 PM

Which function misses what argument? Also, I just updated to Jupyterlab to 2.1.0 so I don't know if there are weird incompatibility issues. Did anyone encounter this? Thanks!!

@ashwinidathatri
Copy link

I have been receiving the same error as well. I doubt if it has anything to do with compatibility of the version. Anyway currently I am using JupyterLab version 1.2.16

Any suggestions on this would be helpful.

@terhorst
Copy link

terhorst commented Aug 13, 2020

This is caused by having an old version of black. pip install -U black fixed it for me. To the maintainers: I don't know when black changed the API for FileMode() but moving from version 18.6b4 to 19.10b0 made this error go away.

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

3 participants