If you see this error when you run prefect deploy:
Conflicting entry found for flow with name ‘task-wrapped-deployments’: task-wrapped-deployments: public-repos/prefect-patterns/flows/task_wrapped_deployments.py:task_wrapped_deployments
Try removing that flow’s entry from ~/.prefect/flows.json
or the flows.json
that may have been created at the root of your repo if you were using an earlier version of the beta deployment yaml pattern.
Check out this github issue for more information:
opened 10:48PM - 16 Jun 23 UTC
bug
### First check
- [X] I added a descriptive title to this issue.
- [X] I use… d the GitHub search to find a similar issue and didn't find it.
- [X] I searched the Prefect documentation for this issue.
- [X] I checked that this issue is related to Prefect and not one of its dependencies.
### Bug summary
flows.json file in the root ~./prefect directory has the incorrect absolute value if you move your entrypont file and run prefect deploy again. This was tricky to debug because I didn't know where the old file path was stored.
Rerunning
`prefect deploy 104/flows.py:pipe`
after changing the file path where you flow code exists results in:
```Conflicting entry found for flow with name 'pipe':
pipe:
Desktop/prefect/demos/certification_courses/pacc/pacc-june-demos
/104/flows.py:pipe
```
The indicated directory no longer exists. I'm not sure why it would matter if it did exist. There is no other `flow.py` file in the directory where I run the command.
Relevant section of the [codebase](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/deployments/base.py):
### Reproduction
```python3
`prefect deploy my_file.py:my_flow`
```
### Error
```python3
entry found for flow with name 'pipe':
pipe:
Desktop/prefect/demos/certification_courses/pacc/pacc-june-demos
/104/flows.py:pipe
```
### Versions
```Text
Version: 2.10.15
API version: 0.8.4
Python version: 3.10.8
Git commit: 49205e57
Built: Fri, Jun 16, 2023 1:29 PM
OS/Arch: darwin/arm64
Profile: prod
Server type: cloud
```
```
### Additional context
_No response_
1 Like