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

Error when replacing file on Windows #333

Closed
edublancas opened this issue Sep 9, 2021 · 5 comments
Closed

Error when replacing file on Windows #333

edublancas opened this issue Sep 9, 2021 · 5 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@edublancas
Copy link
Contributor

====================================================== DAG build failed ======================================================
----- NotebookRunner: fit -> MetaProduct({'model': File('products\\model.pickle'), 'nb': File('products\\report.html')}) -----
----------------------------------------- C:\Users\edubl\Desktop\proj\scripts\fit.py -----------------------------------------
Traceback (most recent call last):
  File "c:\users\edubl\desktop\proj\venv-proj\lib\site-packages\ploomber\tasks\abc.py", line 562, in _build
    res = self._run()
  File "c:\users\edubl\desktop\proj\venv-proj\lib\site-packages\ploomber\tasks\abc.py", line 669, in _run
    self.run()
  File "c:\users\edubl\desktop\proj\venv-proj\lib\site-packages\ploomber\tasks\notebook.py", line 524, in run
    path_to_out_ipynb.rename(path_to_out)
  File "C:\Users\edubl\miniconda3\envs\scaffold\lib\pathlib.py", line 1359, in rename
    self._accessor.rename(self, target)
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\Users\\edubl\\Desktop\\proj\\products\\report.ipynb' -> 'C:\\Users\\edubl\\Desktop\\proj\\products\\report.html'

The above exception was the direct cause of the following exception:
@edublancas edublancas added the good first issue Good for newcomers label Sep 9, 2021
@tharun634
Copy link

I would like to take this up, are there any steps to reproduce this?

@edublancas
Copy link
Contributor Author

I encounter this when fixing another Windows bug, unfortunately, I don't have a Windows machine right now but I think you can reproduce it with this:

  1. install ploomber
  2. Download this example https://github.com/ploomber/projects/tree/master/spec-api-python
  3. Change the pipeline.yaml file, line 18 for output/plot.html https://github.com/ploomber/projects/blob/33122dd49acd47c0b5370921f6d6574a4693c0c5/spec-api-python/pipeline.yaml#L13
  4. Run "ploomber build" in the directory that has the pipeline.yaml
  5. Run "ploomber build" again

Let me know if the error appears

@Harsh-1309
Copy link
Contributor

can I try working on this? @edublancas

@idomic
Copy link
Contributor

idomic commented Oct 26, 2021

@Harsh-1309 Yes feel free, reassigning

@idomic
Copy link
Contributor

idomic commented Jan 1, 2022

@Harsh-1309 any update there?

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

No branches or pull requests

4 participants