pluskid / Mocha.jl

Deep Learning framework for Julia
Other
1.29k stars 254 forks source link

UndefVarError: readbytes not defined #237

Closed anymate98 closed 6 years ago

anymate98 commented 7 years ago

When I tried to run MNIST example after adding Mocha in julia 0.6, I succeeded in downloading data, but after that, I ran into a problem like this:

C:\Users\khkko\.julia\v0.6\Mocha\examples\mnist\data>julia ../convert.jl
Exporting 10000 digits of size 28 x 28
  1:10000...
ERROR: LoadError: UndefVarError: readbytes not defined
Stacktrace:
 [1] (::##1#2)(::HDF5.HDF5File) at C:\Users\khkko\.julia\v0.6\Mocha\examples\mnist\convert.jl:43
 [2] #h5open#5(::Bool, ::Function, ::##1#2, ::String, ::Vararg{String,N} where N) at C:\Users\khkko\.julia\v0.6\HDF5\src\HDF5.jl:661
 [3] h5open(::Function, ::String, ::String) at C:\Users\khkko\.julia\v0.6\HDF5\src\HDF5.jl:659
 [4] macro expansion at C:\Users\khkko\.julia\v0.6\Mocha\examples\mnist\convert.jl:32 [inlined]
 [5] anonymous at .\<missing>:?
 [6] include_from_node1(::String) at .\loading.jl:569
 [7] include(::String) at .\sysimg.jl:14
 [8] process_options(::Base.JLOptions) at .\client.jl:305
 [9] _start() at .\client.jl:371
while loading C:\Users\khkko\.julia\v0.6\Mocha\examples\mnist\convert.jl, in expression starting on line 11

(I am using Win10 64bit, so I had to use WSL for things like wget...)

Anyway, I think that convert.jl has some kind of a problem. I opened convert.jl in Juno after the problem has occurred, and the linter also pointed this out in line 43 and 45, where readbytes is used: E321 readbytes: use of undeclared symbol

+ same problem in cifar10, too

greenflash1357 commented 7 years ago

readbytes got renamed to read in Julia v0.5.

238 handles your issue.

anymate98 commented 7 years ago

Thanks, @greenflash1357 !

pluskid commented 6 years ago

a new version has been released with the fix. Thanks for reporting.