You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module InitializeGlass
using UrlDownload
functiondownloadcatalogs(glassdirectory::String)
catalogs = ("https://www.nikon.com/products/optical-glass/assets/pdf/nikon_zemax_data.zip",
"https://www.oharacorp.com/xls/OHARA_201130_CATALOG.zip",
"https://hoyaoptics.com/wp-content/uploads/2019/10/HOYA20170401.zip")
getzip(url) =urldownload(url,compress =:zip, parser = identity)
@info glassdirectory
for url in catalogs
# try
zipcat =getzip(url)
filename =replace(zipcat.name, r"""[ ,.:;?!()&-]"""=>"_")
filename =replace(filename, "_agf"=>".agf")
filename =replace(filename, "_AGF"=>".agf")
temp =read(zipcat,String)
catname =joinpath(glassdirectory,filename)
@info"writing $catname"write(joinpath(glassdirectory,filename),temp)
# catch err# continue #if download fails for any reason continue to the next catalog# end endenddownloadcatalogs(ARGS[1])
end#module
When executed from the terminal
julia --project=. test.jl ./
produces error
ERROR: LoadError: MethodError: no method matching eof(::ZipFile.ReadableFile)
The applicable method may be too new: running in world age 29850, while current world is 29852.
Closest candidates are:eof(::ZipFile.ReadableFile) at /home/skoffer/.julia/packages/ZipFile/fdYkP/src/ZipFile.jl:533 (method too new to be called from this world context.)
eof(::Base.AbstractPipe) at io.jl:416eof(::HTTP.WebSockets.WebSocket) at /home/skoffer/.julia/packages/HTTP/cxgat/src/WebSockets.jl:251
The text was updated successfully, but these errors were encountered:
When executed from the terminal
produces error
The text was updated successfully, but these errors were encountered: