pascalbe-dev / ulauncher-repo-opener

An ulauncher extension to open your local git repositories with your favorite editor.
MIT License
7 stars 0 forks source link

[BUG] Opening PyCharm project causes Poetry to BREAK #12

Open Jelloeater opened 2 months ago

Jelloeater commented 2 months ago

Ulauncher v5.15.7 Extension version 2024-1-29 e72ec29

IDE: PyCharm Community 2023.3.6

OS: Ubuntu MATE jammy 22.04 x86_64 Kernel: Linux 5.15.0-53-generic Shell: zsh 5.8.1 DE: Mate 1.26.0 WM: Marco (X11) Terminal: guake Locale: en_US.UTF-8


Getting this error when doing a poetry publish

ImportError: cannot import name 'atomic_open' from 'requests.utils' (/usr/lib/python3/dist-packages/requests/utils.py)

When you open Via ulauncher Poetry refuses to run When you do the SAME action via a regular terminal, it works fine. If you open a shell from inside PyCharm, the issue persists in that shell. Also works FINE if you open the PyCharm project up directly.

Not sure what might be breaking with the Python path

The only addl env vars seem to be (BROKEN)

DESKTOP_STARTUP_ID=PyCharm-restart_TIME10478969
GDK_BACKEND=x11
IJ_RESTARTER_LOG=/home/REDACTEDUSERNAME/.cache/JetBrains/PyCharmCE2023.3/log/restarter.log
PS1=%m%#
PYTHONPATH=/usr/lib/python3/dist-packages
SHLVL=3
TERMINAL_EMULATOR=JetBrains-JediTerm
TERM_SESSION_ID=83810e82-d8bc-4d63-a4de-aca9c017ebdb
ULAUNCHER_WS_API=ws://127.0.0.1:5054/com.github.pascalbe-dev.ulauncher-repo-opener
WEZTERM_PANE=0
_P9K_SSH_TTY=/dev/pts/4
_P9K_TTY=/dev/pts/4

vs (WORKS)

GUAKE_TAB_UUID=94e1c117-f8dc-4fd8-b762-c6bcc2e41e21
SHLVL=2
WEZTERM_PANE=1
_P9K_SSH_TTY=/dev/pts/5
_P9K_TTY=/dev/pts/5
pascalbe-dev commented 2 months ago

Interesting. Thanks for sharing. Out of my head, I see no way of solving right now. I do not use PyCharm these days, so I do not have that issue.

What happens, if you start pycharm via command line and then run your stuff there? Does it work then (does it set the correct env vars)?

If you see a way of fixing, I'm happy to introduce it to the extension. Or - even better - feel free to add a PR.

Jelloeater commented 2 months ago

If I start PyCharm from the CLI, or even from uLauncher, it's fine. And if I open the project with the CLI it's fine too Ex pycharm . from the project dir.

I would love to make a PR, really love uLauncher AND Python, I just don't have the time RN 😢

pascalbe-dev commented 2 months ago

Hey, I'll see if I find something. But also quite low on time. But we'll see. Thanks for sharing the insights again!