RUB-EP1 / amplitude-serialization

Prototype for the amplitude model serialization format
https://rub-ep1.github.io/amplitude-serialization
MIT License
2 stars 1 forks source link

`File exists` error #35

Open mmikhasenko opened 1 month ago

mmikhasenko commented 1 month ago

File exists error appears when running pixi run doc on Lb2pKgbranch.

Something simple, I'm sure. The error message is very uninformative. First thought is a conflict of Lb2pKg and Lc2pKpi files somehow.

zsh> git clean -f
Removing .DS_Store
Removing docs/.DS_Store
Removing docs/julia/.DS_Store
Removing docs/julia/Lb2pKg_files/.DS_Store
Removing docs/julia/Lb2pKg_files/execute-results/.DS_Store
zsh>  pixi run doc                     
✨ Pixi task (install-julia in default): juliaup add 1.10.3 && juliaup default 1.10.3 && julia --project -e '
    using Pkg
    Pkg.add("IJulia")
    import IJulia
    IJulia.installkernel("julia-amplitude-serialization")
'

'1.10.3' is already installed.
Configured the default Julia version to be '1.10.3'.
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
  No Changes to `~/.julia/environments/v1.10/Project.toml`
  No Changes to `~/.julia/environments/v1.10/Manifest.toml`
[ Info: Installing julia-amplitude-serialization kernelspec in /Library/Jupyter/kernels/julia-amplitude-serialization-1.10

✨ Pixi task (doc in default): quarto render
[1/6] HS3.md
[2/6] python/lc2pkpi.qmd

Starting python3 kernel...(Notebook read from cache)

[3/6] description.md
[4/6] index.md
[5/6] julia/lc2pkpi.qmd

Starting julia-amplitude-serialization-1.10 kernel...Done

Executing 'lc2pkpi.ipynb'
  Cell 1/8: ''...Done
  Cell 2/8: ''...Done
  Cell 3/8: ''...Done
  Cell 4/8: ''...Done
  Cell 5/8: ''...Done
  Cell 6/8: ''...Done
  Cell 7/8: ''...Done
  Cell 8/8: ''...Done

[Errno 17] File exists: '/AmplitudeModelSerialization/docs/julia/.jupyter_cache/executed/8b6f7c9fbb6beb9d814edc9f489a4490'
redeboer commented 1 month ago

I had a similar problem like this before. Quick solution is just to clean all git-ignored files

git clean -Xdf

The 'correct' way would be to clean with jupyter-cache directly, but it seems not to be available in the Pixi environment (I'm not sure why though — it is used by quarto somehow).

mmikhasenko commented 1 month ago

I had a similar problem like this before. Quick solution is just to clean all git-ignored files

git clean -Xdf

The 'correct' way would be to clean with jupyter-cache directly, but it seems not to be available in the Pixi environment (I'm not sure why though — it is used by quarto somehow).

Solves the problem! Let's add the solution to the readme and close the issue for now

redeboer commented 1 month ago

Let's add the solution to the readme and close the issue for now

Could be done, but I'm not entirely sure what caused the problem in your case. What I described is more of a general tip for using repositories that have reproducible environments: just clean all the build files (git clean), checkout the branch of interest, recreate the environment (pixi does this automatically), and run. Almost like starting a new container like GitHub Actions does.