sisl / tufte_algorithms_book

A template for textbooks in the same style as Algorithms for Optimization
350 stars 66 forks source link

build issue for Plots.Image() #25

Closed AshtonSBradley closed 4 years ago

AshtonSBradley commented 4 years ago

After fully rebuilding the book with a new checkout from this repo, and manually adding ImageIO which it requests, I still get an error that I can't get past:

----  Messages for jl:default:default  ----
* PythonTeX notice
    1 message(s) could not be classified
    Interpreted as errors, based on the return code(s)
  ERROR: LoadError: FileIO.File{FileIO.DataFormat{:UNKNOWN}}("/Users/abradley/Dropbox/Julia/linear_systems_book_v4/tmp_10000000000001.png") couldn't be recognized by FileIO.

  Stacktrace:
   [1] #save#30(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(FileIO.save), ::FileIO.Formatted, ::Any) at /Users/abradley/.julia/packages/FileIO/Glbhe/src/loadsave.jl:196
   [2] save at /Users/abradley/.julia/packages/FileIO/Glbhe/src/loadsave.jl:196 [inlined]

It only happens for a particular figure in the book, which is a 2d image. Other figures that are just regular line plots work fine. So the offending command is

push!(g, Axis(Plots.Image(abs2.(f),(-1e-3,1e-3),(0.,3e-3),colormap=ColorMaps.Named("Blues"),colorbar=false),
             width="5cm",height="10cm"))

I am using

julia> versioninfo()
Julia Version 1.3.1
Commit 2d5741174c (2019-12-30 21:36 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.6.0)
  CPU: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
  JULIA_NUM_THREADS = 4

Any help greatly appreciated!

mykelk commented 4 years ago

Can you delete /Users/abradley/Dropbox/Julia/linear_systems_book_v4/tmp_10000000000001.png and try again?

AshtonSBradley commented 4 years ago

ok, this time that worked! Thanks... not sure what I did to get into that stuck state

mykelk commented 4 years ago

Great!