Comments (3)
Ah, thanks for this. I'll fix it up when I have a chance. It looks like loading the config should guard against the file missing and return a default instead.
from cli.
Hmm. I can't reproduce this on 1.7.1, and indeed the code already guards against the cases I thought you were hitting: https://github.com/nextstrain/cli/blob/master/nextstrain/cli/config.py#L36-L41
That error is what I'd expect if the /Users/trvrb/.nextstrain
directory didn't exist by the time path.open
was called, which would only happen if the mkdir()
silently failed. I can't get it to do so.
from cli.
Ah ha! I think you're hitting this Python bug in path.resolve(), which was fixed first in 3.6.2 (you have 3.6.1) and noted with the following changelog entry:
path.resolve(strict=False)
no longer cuts the path after the first element not present in the filesystem. Patch by Antoine Pietri.
Note that strict=False
is the default.
Indeed, this description of the effect of the bug matches what we're seeing:
For what it's worth, this bug was the cause of an important downtime in our organization, because someone needed to normalize a path that was later passed to a .mkdir(parents=True), and it was, in some cases, silently doing the mkdir of a wrong path instead of creating all the parents.
This means that the mkdir()
in our code on your computer was happening against /Users/trvrb
instead of /Users/trvrb/.nextstrain
! which matches my diagnosis above.
I'll add a workaround in our code next week. In the meantime, you can mkdir ~/.nextstrain
and move on with your life if you haven't already.
On top of all this, I also now see that the default behaviour for path.resolve()
changed between 3.5 and 3.6, with no way at all to ask for 3.6's default behaviour (which we want) on 3.5. I'd thought the defaults matched. I'll address that as well.
from cli.
Related Issues (20)
- Windows: Snakemake arguments with file paths containing backslashes produce file not found errors
- ENH: Print docker image used at beginning of aws-batch jobs HOT 2
- When using `--aws-batch`, the `--image` argument is ignored HOT 2
- BUG: `nextstrain update conda` doesn't seem to update to latest available conda-base HOT 18
- Confusing log message "runtime updated" when nothing was changed HOT 3
- `nextstrain update singularity` throws error about OCI indexes with Singularity 2.6 and 3.5.3 HOT 13
- Add command to self-upgrade HOT 3
- Auto-trigger Docker and Conda runtime builds on CLI releases
- `Your request was too big` error on stock RSV repo build via aws-batch HOT 7
- [build] `--cpus` isn't passed to thru when using `--exec` HOT 5
- Read-only filesystem errors from Snakemake in Singularity runtime HOT 2
- Installation fails when there is a space in the path HOT 1
- Docker runner assumes the Docker Hub (docker.io) registry HOT 4
- ENH: Detect and warn user if their environment deviates from nextstrain-base HOT 1
- Pyright failures with 1.1.309
- `nextstrain update conda` in 7.0.0 can error with "Invalid version" HOT 13
- Improve runtime documentation HOT 1
- pyparsing 3.1.0 causing test failures in Markdown image inlining HOT 4
- [batch] ZIP archive of build dir is stored without compression HOT 1
- `nextstrain update conda` fails silently HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.