Comments (4)
Not for me. Can you provide a fully-reproducible example? Something that runs if you just copy/paste it in the REPL. I can handle the directory-creation, don't worry about that part.
from fileio.jl.
Sorry for the confusion. I thought the bug was common. But it may only be triggered by a specific type, I guess.
Here is a a fully-reproducible example:
using FileIO
using Luxor
function randpic(size=32)
d = Drawing(size, size, :image)
origin()
background(1,1,1)
setcolor(1,0,0)
circle(Point(0, 0), size÷2; action=:fill)
mat = image_as_matrix()
finish()
mat
end
pic = randpic();
@show typeof(pic)
mkdir("datasets2")
for i in 1:20000
save("datasets2/$i.png", pic)
end
typeof(pic) = Base.ReinterpretArray{ARGB32, 2, UInt32, Matrix{UInt32}, false}
All errors:
===========================================
MethodError: no method matching _get_color_type(::Matrix{ARGB32})
Closest candidates are:
_get_color_type(::IndirectArrays.IndirectArray) at ~/.julia/packages/PNGFiles/oYmtV/src/io.jl:526
_get_color_type(::AbstractArray{<:Gray{T}}) where T at ~/.julia/packages/PNGFiles/oYmtV/src/io.jl:518
_get_color_type(::AbstractArray{<:GrayA{T}}) where T at ~/.julia/packages/PNGFiles/oYmtV/src/io.jl:519
...
===========================================
WriteBlob Failed `datasets2/4040.png' @ error/png.c/MagickPNGErrorHandler/1642
===========================================
SystemError: opening file "datasets2/4040.png": Too many open files
===========================================
Errors encountered while save File{DataFormat{:PNG}, String}("datasets2/4040.png").
My environment:
Julia Version 1.7.0-rc2
Commit f23fc0d27a (2021-10-20 12:45 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Status ~/.julia/environments/v1.7/Project.toml
[5789e2e9] FileIO v1.11.2
[916415d5] Images v0.24.1
[ae8d54c2] Luxor v2.16.0
from fileio.jl.
Is there anything can be done in FileIO.jl? After all the manual open-save-close form works fine. I don't know FileIO's mechanism, but as a user I hope the framework will force close everything it opened. Thank you.
from fileio.jl.
So FileIO doesn't handle the opening/closing.
from fileio.jl.
Related Issues (20)
- Proposal: FileIO.save keyword argument syntax (FileIO.kwsave ?) HOT 3
- FIle collision on case sensitive file systems after recent release.
- House AVSfldIO.jl under JulioIO ? HOT 9
- FileIO is not threadsafe HOT 4
- Error in magic function detect_rdata HOT 4
- There was an error in magic function detect_rdata_single HOT 5
- No applicable_loaders found for UNKNOWN HOT 3
- RData can't load .rda files with [email protected] but can with [email protected] HOT 2
- Confusing error when saving the wrong thing
- AstroIO required when it shouldn't be HOT 5
- FileIO not loading / requiring dependency AVSfldIO properly HOT 2
- @maybe macro
- registering zarr files HOT 1
- register Matlab's .mat HOT 1
- Incorrectly export GIF image
- Unhelpful output `#27 (generic function with 1 method)` HOT 2
- [FR] suppert for .webp format HOT 3
- Test failure in CSVFiles
- Base.download deprecation warning in tests
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 fileio.jl.