# ImageView not precompiling -- UndefVarError

**URL:** <https://discourse.julialang.org/t/imageview-not-precompiling-undefvarerror/90801>\
**Category:** General Usage\
**Tags:** package\
**Created:** [November 25, 2022, 11:59am UTC](https://discourse.julialang.org/t/imageview-not-precompiling-undefvarerror/90801 "2022-11-25T11:59:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![del](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@del](https://discourse.julialang.org/u/del)\
**Post date:** [November 25, 2022, 11:59am UTC](https://discourse.julialang.org/t/imageview-not-precompiling-undefvarerror/90801/1 "2022-11-25T11:59:06Z")

</div>

I have been unable to precompile ImageView from midway in the 1.9.0 dev series to now 1.10.0-Dev.38.  
In all attempts there is a common error flagged:

ERROR: LoadError: UndefVarError: `#imshow##kw` not defined

It would be cool to have my own cheap Photoshop, below are the woeful messages generated:

julia\> using ImageView  
[Info: Precompiling ImageView [86fae568-95e7-573e-a6b2-d8a6b900c9ef]  
WARNING: method definition for colorbutton at /home/del/.julia/packages/GtkObservables/u6z6P/src/widgets.jl:360 declares type variable T but does not use it.  
WARNING: method definition for colorbutton at /home/del/.julia/packages/GtkObservables/u6z6P/src/widgets.jl:360 declares type variable T but does not use it.  
ERROR: LoadError: UndefVarError: `#imshow##kw` not defined  
Stacktrace:  
[1] top-level scope  
@ ~/.julia/packages/ImageView/AJiQh/src/ImageView.jl:787  
[2] include  
@ ./Base.jl:450 [inlined]  
[3] include\_package\_for\_output(pkg::Base.PkgId, input::String, depot\_path::Vector{String}, dl\_load\_path::Vector{String}, load\_path::Vector{String}, concrete\_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)  
@ Base ./loading.jl:1667  
[4] top-level scope  
@ stdin:1  
in expression starting at /home/del/.julia/packages/ImageView/AJiQh/src/ImageView.jl:1  
in expression starting at stdin:1  
ERROR: Failed to precompile ImageView [86fae568-95e7-573e-a6b2-d8a6b900c9ef] to /home/del/.julia/compiled/v1.10/ImageView/jl\_ObiS3j.  
Stacktrace:  
[1] error(s::String)  
@ Base ./error.jl:35  
[2] compilecache(pkg::Base.PkgId, path::String, internal\_stderr::IO, internal\_stdout::IO, keep\_loaded\_modules::Bool)  
@ Base ./loading.jl:1820  
[3] compilecache  
@ ./loading.jl:1764 [inlined]  
[4] \_require(pkg::Base.PkgId, env::String)  
@ Base ./loading.jl:1431  
[5] \_require\_prelocked(uuidkey::Base.PkgId, env::String)  
@ Base ./loading.jl:1295  
[6] macro expansion  
@ ./loading.jl:1275 [inlined]  
[7] macro expansion  
@ ./lock.jl:267 [inlined]  
[8] require(into::Module, mod::Symbol)  
@ Base ./loading.jl:1238

I hope this is an easy fix.  
I also am very excited about JuliaCon 2022!

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [November 25, 2022, 2:38pm UTC](https://discourse.julialang.org/t/imageview-not-precompiling-undefvarerror/90801/2 "2022-11-25T14:38:33Z")

</div>

> [@del](#):
>
> It would be cool to have my own cheap Photoshop, below are the woeful messages generated:

Indeed, but perhaps you could try Julia 1.8 for now. I don’t know whether all packages have been updated for 1.9 and 1.10 yet.

---

<div class="post-metadata">

**Author:** ![del](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@del](https://discourse.julialang.org/u/del)\
**Post date:** [November 25, 2022, 3:06pm UTC](https://discourse.julialang.org/t/imageview-not-precompiling-undefvarerror/90801/3 "2022-11-25T15:06:40Z")

</div>

Thanks, I am not so unstable that running stable is a problem.  
Now, will running the latest stable version screw up any chance of a dev release  
being able to precompile packages correctly?  
Is it possible to have ./julia for the stable release and for instance specify  
./julia-dev for a development release?

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [November 25, 2022, 8:21pm UTC](https://discourse.julialang.org/t/imageview-not-precompiling-undefvarerror/90801/4 "2022-11-25T20:21:58Z")

</div>

> [@del](#):
>
> will running the latest stable version screw up any chance of a dev release  
> being able to precompile packages correctly?

I’m not quite sure what this means… but according to “semver” (semantic versioning) Julia 1.9 should run code that runs OK on Julia 1.8.

But, as I understand it, a new version of a package that relies on new features introduced in 1.9 will not even be available for loading on 1.8 - because its Project.toml file will contain the line

```julia
julia = "1.9"

```

so you wont be able to add that version to a 1.8 environment.

---

<div class="post-metadata">

**Author:** ![del](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@del](https://discourse.julialang.org/u/del)\
**Post date:** [November 27, 2022, 9:59am UTC](https://discourse.julialang.org/t/imageview-not-precompiling-undefvarerror/90801/5 "2022-11-27T09:59:23Z")

</div>

@cormullion  
Thanks for your reply, I saw it first the day before yesterday in an email notification. The email had a reply button which I selected to respond but at least for me, the reply went to the bit bucket.  
I am running stable for ImageView. I’ll compile a dev release every few days to see if the missing variable error gets rectified.  
On account of that error I am leaving this topic open.  
Again, thanks for your time and patience!
