Exception: Passing list, expecting str
See original GitHub issueHi, this extension fails on exception with latest JupyterLab 1.14 and latest black 19.3b0.
Exception is exactly printed into console in happens in:
- file formatters.py
- class BlackFormatter
- function: format_code(…)
- line:
code = re.sub("^%", "#%#", code, flags=re.M)
It fails on input argument $code (that is of type list), but should be string
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Why pass a string argument to raise Exception() - Stack Overflow
The tuple of arguments given to the exception constructor. Some built-in exceptions (like OSError) expect a certain number of arguments and ...
Read more >Built-in Exceptions — Python 3.11.1 documentation
Except where mentioned, they have an “associated value” indicating the detailed cause of the error. This may be a string or a tuple...
Read more >30. Errors and Exception Handling | Python Tutorial
Exception Handling. An exception is an error that happens during the execution of a program. Exceptions are known to non-programmers as ...
Read more >TypeError: expected string or bytes-like object in Python
The Python "TypeError: expected string or bytes-like object" occurs when we pass an argument of a different type to a method that expects...
Read more >Best Practices for exceptions - .NET - Microsoft Learn
Learn best practices for exceptions, such as using try/catch/finally, handling common conditions without exceptions, and using predefined .
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ah great to hear.
But I thought conda should have installed v0.5.2 for you instead of a fialure? The conda recipe (maintained by others) install both the julyterlab server and lab extension from source, the end result should be a working version of v0.5.2 instead of a vesion mismatch/imcomplete install.
Yes this is a mistake on my part, will do this once I have time.
How easy, that worked. Thank you very much Ryan.
The core of the problem is here:
My recommendation: Bring a note to the conda-installation steps in your github please - that conda does not contain latest version v0.6.0, and until that time, only installation via pip works correctly.
If possible Make strict requirement in you jupyterlab extension, that it requires v.0.6.0 and do not accept old version v0.5.2
Thank you Ryan for your great work! You plugin makes a difference, when using JupyterLab!