Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefect wont work on UNC Path VENV #16060

Open
cleung625 opened this issue Nov 19, 2024 · 3 comments
Open

Prefect wont work on UNC Path VENV #16060

cleung625 opened this issue Nov 19, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@cleung625
Copy link

cleung625 commented Nov 19, 2024

Bug summary

Introduction

We are using prefect 2.18.3 on via windows conda environments. We are noticing that prefect does not return on CLI whenever we activate the virtual environment from another machine via network (UNC paths).

Set up

  • We have a machine: V-TM-QEQ-06, where the machine hosts the Prefect virtual environment. This is located in C:\PResearch within the machine.
  • We want to activate this virtual environment from other machines to use prefect. Therefore, we map and shared this network location \\v-tm-qeq-06\PResearch so that it can be globally accessed from the network drive.
  • On another machine: V-TM-QEQ-04, we want to activate this virtual environment by running conda activate \\v-tm-qeq-06\PResearch
  • After activating, we realize that prefect does not resolve to the right path. It resolves to the original C:\ path from v-tm-qeq-06

Error Message

(\\v-tm-qeq-06\PResearch) C:\Users\qtask>prefect
Fatal error in launcher: Unable to create process using '"C:\PResearch\python.exe"  "\\v-tm-qeq-06\PResearch\Scripts\prefect.exe" ': The system cannot find the file specified.

Takeaways

  • Can we please enable UNC paths so that the prefect.exe can resolve to the UNC path given? Thank you!

Version info

(C:\PResearch) C:\Users\qtask>prefect version
Version:             2.18.3
API version:         0.8.4
Python version:      3.9.19
Git commit:          c449aee8
Built:               Thu, May 2, 2024 5:47 PM
OS/Arch:             win32/AMD64
Profile:             default
Server type:         server

Additional context

As a workaround, we created new venv for each machine, and then pointed the PREFECT_API_URL = http://v-tm-qeq-06:4200/api
and it seems to solve the issue for now, however it should really be pointing to the correct venv when using cli prefect commands.

Raised this issue as it could be related to the other issue I have posted with task retries. Both machines are running on two separate venvs, would that have caused the issue? How do we solve that issue and this one at the same time if that is the case? Thank you

#16059

@cleung625 cleung625 added the bug Something isn't working label Nov 19, 2024
@zzstoatzz
Copy link
Collaborator

zzstoatzz commented Nov 19, 2024

hi @cleung625 - I think this was solved in 3.x but not backported yet.

any interest in helping backport this? otherwise we can get on that soon


reading your issue again im not sure its the same thing, though likely related.

can you explain what your prefect usage is to encounter this? as

After activating, we realize that prefect does not resolve to the right path. It resolves to the original C:\ path from v-tm-qeq-06

doesn't seem directly about prefect itself

@cleung625
Copy link
Author

Yeah sorry I should clarify

  • We activated the virtual environment conda activate \\v-tm-qeq-06\PResearch
  • We run prefect version on the activated virtual environment cmd console
  • It returns the error Fatal error in launcher: Unable to create process using '"C:\PResearch\python.exe" "\\v-tm-qeq-06\PResearch\Scripts\prefect.exe" ': The system cannot find the file specified. . To me it seems like it is resolving to the C:\Presearch path isntead of the \v-tm-qeq-06\PResearch path

@cleung625
Copy link
Author

So I think the prefect.exe resolves to C:\ as the default path instead of \v-tm-qeq-06... hope that makes sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants