Bug#1032995: spyder: Spyder on startup says there is a missing dependency (pylsp_black) but it is correctly installed

Julian Gilbey jdg at debian.org
Mon May 29 11:13:38 BST 2023


On Thu, May 25, 2023 at 08:03:19PM +0100, Julian Gilbey wrote:
> On Thu, May 25, 2023 at 09:25:50AM -0700, Brian Vaughan wrote:
> > # Spyder, Help > Dependencies
> > [...]
> > pylsp >=1.7.1;<1.8.0          :  1.7.1 (OK)
> > pylsp_black >=1.2.0           :  None (NOK)
> 
> Hi Brian,
> 
> Thanks for sending all this through.  This is so weird.
> [...]
> All looks normal here.
> 
> I am utterly mystified why spyder is not finding pylsp_black.  I'll
> have a think about it and get back to you.

If you're able to do the following tests, it might help shed some
light on what's going wrong.  The attached is a patch for the file
/usr/lib/python3/dist-packages/spyder/dependencies.py
to give more debugging output.  Please apply the patch; you can do
this by saving the patch to a file, say /tmp/dependencies.py.diff,
then running the commands:

cd /usr/lib/python3/dist-packages/spyder/dependencies.py
patch --backup < /tmp/dependencies.py.diff

where the "--backup" option saves a copy of the original
dependencies.py file as dependencies.py.orig.

Once this patch is applied, start spyder from a terminal using the
command:

spyder --debug-info verbose

and let it run at least until it gives the warning message about
pylsp_black not being found, then quit spyder.  There will be lots of
messages written to the terminal, but they will also be saved in the
file .config/spyder-py3/spyder-debug.log

Have a look through this file for "pylsp_black".  Here's what I see:

2023-05-29 11:00:24,689 [DEBUG] [spyder.dependencies] -> Dependency(pylsp_black, python_lsp_black) starting
2023-05-29 11:00:24,931 [DEBUG] [spyder.dependencies] -> Dependency: get_module_version returned None for pylsp_black
2023-05-29 11:00:24,932 [DEBUG] [spyder.dependencies] -> Dependency: get_package_version returned 1.2.1 for pylsp_black

I'm guessing you'll get something quite different, probably with some
further debugging output following it (perhaps "Dependency: exception
raised..." followed by "Dependency: when exception raised...").  If
you're able to do this experiment, please could you send me these
lines of the log file.  (I don't imagine that I would need any more of
the log file at this point.)

I do hope this will help to find the source of the problem!

Best wishes,

   Julian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dependencies.py.diff
Type: text/x-diff
Size: 2367 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20230529/18428b34/attachment.diff>


More information about the debian-science-maintainers mailing list