sourcery-ai / sourcery

Instant AI code reviews
https://sourcery.ai
MIT License
1.56k stars 71 forks source link

In JetBrain, Sourcery coding assistant window appears blank #400

Closed jmborr closed 1 year ago

jmborr commented 1 year ago

Checklist

Description

File -> Settings, then expand Tools:

Capture

I press Login, then OKso that I can see the popup message in Pycharm:

Capture

The browser has open a page asking to confirm. The code is the correct one:

Capture

I press Confirm and get the message the device's connected

Capture

A new popup in Pycharm tells me login's successful:

Capture

At this point, I'm expecting the Sourcey Tab allows me to do something, but no, I can do nothing with it:

Capture

Last lines of ~/.local/share/sourcery/sourcery.log:

2023-11-14 22:13:59,413 | 2645550 | PY-232.8660.197 | WARNING | sourcery.engine.mcmc | log_cancelled:510 | MCMC was cancelled.
2023-11-14 22:13:59,414 | 2645550 | PY-232.8660.197 | WARNING | sourcery.engine.mcmc | log_cancelled:510 | MCMC was cancelled.
2023-11-14 22:13:59,414 | 2645550 | PY-232.8660.197 | WARNING | sourcery.engine.standalone_scanners | _run_split_standalone_scanners:239 | Running standalone scanners cancelled
2023-11-14 22:13:59,416 | 2645550 | PY-232.8660.197 | WARNING | sourcery.engine.mcmc | log_cancelled:510 | MCMC was cancelled.
2023-11-14 22:13:59,417 | 2645550 | PY-232.8660.197 | WARNING | sourcery.engine.mcmc | log_cancelled:510 | MCMC was cancelled.
2023-11-14 22:13:59,417 | 2645550 | PY-232.8660.197 | WARNING | sourcery.engine.standalone_scanners | _run_split_standalone_scanners:239 | Running standalone scanners cancelled
2023-11-14 22:13:59,419 | 2645550 | PY-232.8660.197 | WARNING | sourcery.engine.mcmc | log_cancelled:510 | MCMC was cancelled.
2023-11-14 22:13:59,420 | 2645550 | PY-232.8660.197 | WARNING | sourcery.engine.mcmc | log_cancelled:510 | MCMC was cancelled.
2023-11-14 22:13:59,420 | 2645550 | PY-232.8660.197 | WARNING | sourcery.engine.standalone_scanners | _run_split_standalone_scanners:239 | Running standalone scanners cancelled
2023-11-14 22:14:02,651 | 2645550 | PY-232.8660.197 | INFO | binary.lsp.workspace | publish_diagnostics:153 | Publishing 61 diagnostics for file:///home/jbq/repositories/GitHub/neutrons/RefRed/RefRed/interfaces/mplwidgets.py
2023-11-14 22:16:42,412 | 2645550 | PY-232.8660.197 | INFO | binary.lsp.sourcery_ls | handler:281 | textDocument/didClose -> {'textDocument': {'uri': 'file:///home/jbq/repositories/GitHub/neutrons/RefRed/development.yml'}}
2023-11-14 22:16:42,413 | 2645550 | PY-232.8660.197 | INFO | binary.lsp.sourcery_ls | handler:284 | textDocument/didClose <-
2023-11-14 22:16:43,477 | 2645550 | PY-232.8660.197 | INFO | binary.lsp.sourcery_ls | handler:281 | textDocument/didClose -> {'textDocument': {'uri': 'file:///home/jbq/repositories/GitHub/neutrons/RefRed/RefRed/main.py'}}
2023-11-14 22:16:43,478 | 2645550 | PY-232.8660.197 | INFO | binary.lsp.sourcery_ls | handler:284 | textDocument/didClose <-

All the videos I've looked at Youtube show a different login API, using the personal token instead of a login button:

Capture

I'm guessing the login API has changed since these videos were posted, right?

Debug Information

IDE Version: PyCharm Professional Edition 2023.2

Sourcery Version: 1.14.0

Operating system and Version: Ubuntu 22.04

brendanator commented 1 year ago

Thanks for reporting this @jmborr

We have seen some inconsistencies with loading the Sourcery tool window in JetBrains IDEs.

One pattern that I have started to notice is that it can depend on the combination of OS and the version of PyCharm (Intellij, etc.).

Please can you try upgrading to the latest PyCharm (2023.2.5) and see if that makes any difference?

jmborr commented 1 year ago

Updating to PyCharm 2023.2.5 did the trick:

Capture

Thank you 😃 Please close this Issue at your convenience