Batch file stops after spawning poetry venv with "poetry shell"

Viewed 24

Example:

poetry shell
echo asd

As result i get

"Spawning shell within C:\Users...". (expected result)

But then nothing happens. Even echo asd doesn't works. All commands before poetry shell are working, but after it - nothing.

Same with

call "poetry" shell

Poetry version is 1.1.14

upd: poetry is python module for dependency control, alternative for pip. I created a virtual environment in my project and "poetry shell" activates this venv and packages. In my batch file i call it, and then only assign env variables (on example, token) and call python my_script.py

If i just run my_script.py without poetry shell, i will get expected exception, because aiogram module is only in my project virtual environment.

But after opening this batch file, if i run same script - everything works and no exceptions appears

So it means, that poetry shell works and there is not exceptions was after calling it. But somewhy, scripts after it from batch file still not calling.

(poetry.exe are located in "..Python\Python310\Scripts")

0 Answers
Related