Comments (12)
I also had this error and posted on the Discourse.
I tried tinkering around for a bit and found the following:
- The
USER_INVENTORY
contains the pathC:\\Users\USERNAME\\AppData\\Local\\cache\\julia\\DataToolkit\\cache\\Inventory.toml
. - When
dirname(path)
is called, the result isC:\\Users\\USERNAME\\AppData\\Local\\cache\\julia\\DataToolkit\\cache
. - Finally, the
mkpath(dirname(path))
treats thecache
at the end as a file name and so it creates a file calledcache
in the...\\DataToolkit\\
folder.
Temporary solution
Just create the C:\\Users\\USERNAME\\AppData\\Local\\cache\\julia\\DataToolkit\\cache\\
folder yourself (you can leave it empty). This worked for me; the compilation proceeded without problems and the Inventory.toml
file was created in the manually created ...\\cache
folder.
from datatoolkitcommon.jl.
Thanks for looking into this!
That behaviour is interesting, I thought mkpath
always created a directory, not a file 😕.
from datatoolkitcommon.jl.
I don't think it's this mkpath
itself that's the issue. If I run the steps @vtfanta outlined above, with an empty C:\Users\USERNAME\AppData\Local\cache\julia\DataToolkit
then cache
gets created as a folder as expected. So presumably something earlier in the precompilation process is touching that dir?
from datatoolkitcommon.jl.
Heh, not for me unfortunately:( With the empty DataToolkit
I, again, get the chache
'file' and the error.
from datatoolkitcommon.jl.
Hmm, interesting. I should have noted originally, I do get the same precompilation error, but if I manually run those steps mkpath
makes a path, not a file.
from datatoolkitcommon.jl.
So presumably something earlier in the precompilation process is touching that dir?
I think you are correct. When I commented out the initially suspicious lines 232-240 in inventory.jl
the cache
file still got created. Now after commenting out the BaseDirs.User.cache(BaseDirs.Project("DataToolkit"), create=true)
in Store.jl
it no longer happens, so I think that nails it down to this line.
from datatoolkitcommon.jl.
Thanks for narrowing it down guys! The BaseDirs
code may be slightly hard to navigate at a glance, the relevant bit is this: https://github.com/tecosaur/BaseDirs.jl/blob/d6c8e0d9bd5910395890d8a18b4fb1242d91aebe/src/internals.jl#L50-L67
So in order to create a directory, BaseDirs.projectpath(BaseDirs.Project("DataToolkit"))
needs to end with a /
.
On my Linux machine, I see this:
julia> BaseDirs.projectpath(BaseDirs.Project("DataToolkit"))
"julia/datatoolkit/"
The code for Windows implementation of projectpath
is here: https://github.com/tecosaur/BaseDirs.jl/blob/d6c8e0d9bd5910395890d8a18b4fb1242d91aebe/src/nt.jl#L277-L289
So from that, it looks like the fix would be adjusting how BaseDirs
behaves on Windows appropriately.
from datatoolkitcommon.jl.
The use of a hardcoded /
instead of something platform-adaptive is so that it can be used in strings and be consistent across all platforms, e.g. BaseDirs.User.cache(BaseDirs.Project("DataToolkit"), "subfolder/", create=true)
.
I think what needs to be changed here might just be the behaviour when only a project is provided.
from datatoolkitcommon.jl.
I've just pushed tecosaur/BaseDirs.jl@729a9e33f23, if you might be able to try using (]add BaseDirs#729a9e33f
) and seeing if it works now, that would be much appreciated!
from datatoolkitcommon.jl.
Brilliant! This works on my Win10 :)
from datatoolkitcommon.jl.
I'll see if I've thought of any issues with the approach in the next ~day, and if not tag that as BaseDirs v1.2.2, and close this issue.
Thanks for the help!
from datatoolkitcommon.jl.
v1.2.2 is now being registered (JuliaRegistries/General#100782), so I think I can (finally) close this 🥳
from datatoolkitcommon.jl.
Related Issues (13)
- TagBot trigger issue HOT 13
- MD5 fails to get checksum with TypeError HOT 2
- Tutorial for adding a new data loader
- Test all the data transformers
- Multi-file loader
- Lazy loading for Arrow.jl
- Loader for BED Files
- Hugging face loader?
- Rclone for storage layer
- Add HDF5 loader HOT 1
- Specify storage location for downloaded datasets HOT 6
- Feature request: Arrow loader HOT 5
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 datatoolkitcommon.jl.