Issues on using Plots package in Julia - julia

I'm trying to use Plots package in Julia but I get an error message I don't fully understand. Using a Jupyter notebook I followed the canonic way to install and use the package with:
Pkg.add("Plots")
using Plots
But after then I got this error message:
INFO: Precompiling module Plots.
WARNING: Module Compat with uuid 131681569370755 is missing from the cache.
This may mean module Compat does not support precompilation but is imported by a module that does.
ERROR: LoadError: Declaring __precompile__(false) is not allowed in files that are being precompiled.
Stacktrace:
[1] _require(::Symbol) at .\loading.jl:455
[2] require(::Symbol) at .\loading.jl:405
[3] include_from_node1(::String) at .\loading.jl:576
[4] include(::String) at .\sysimg.jl:14
[5] anonymous at .\<missing>:2
while loading C:\Users\Alex\.julia\v0.6\StaticArrays\src\StaticArrays.jl, in expression starting on line 17
ERROR: LoadError: Failed to precompile StaticArrays to C:\Users\Alex\.julia\lib\v0.6\StaticArrays.ji.
Stacktrace:
[1] compilecache(::String) at .\loading.jl:710
[2] _require(::Symbol) at .\loading.jl:463
[3] require(::Symbol) at .\loading.jl:405
[4] include_from_node1(::String) at .\loading.jl:576
[5] include(::String) at .\sysimg.jl:14
[6] anonymous at .\<missing>:2
while loading C:\Users\Alex\.julia\v0.6\Plots\src\Plots.jl, in expression starting on line 7
Failed to precompile Plots to C:\Users\Alex\.julia\lib\v0.6\Plots.ji.
Stacktrace:
[1] compilecache(::String) at .\loading.jl:710
[2] _require(::Symbol) at .\loading.jl:497
[3] require(::Symbol) at .\loading.jl:405
[4] include_string(::String, ::String) at .\loading.jl:522
Could somebody please help me to understand this error and what can I do to fix it? Any help will be much appreciated.

That's because you already had Compat in your scope before trying to update. It then has an issue of trying to precompile using a new version of Compat while an old one is still in scope. To fix this, just restart Julia and do using Plots.

Related

WSO2 APIM 3.2.0 error while updating API definition

We are getting the below error while updating the API definition through publisher on WSO2 3.2.0 APIM. How to fix this issue:
TID: [-1234] [api/am/publisher] [2021-09-13 11:32:18,306] ERROR {org.wso2.carbon.apimgt.rest.api.util.exception.GlobalThrowableMapper} - An unknown exception has been captured by the global exception mapper. org.apache.cxf.interceptor.Fault: Couldn't find MIME boundary: ------WebKitFormBoundaryEsb6bxMwX39fG8Sb
at org.apache.cxf.interceptor.AttachmentInInterceptor.handleMessage(AttachmentInInterceptor.java:60)
at org.apache.cxf.jaxrs.ext.MessageContextImpl.createAttachments(MessageContextImpl.java:284)
at org.apache.cxf.jaxrs.ext.MessageContextImpl.get(MessageContextImpl.java:79)
at org.apache.cxf.jaxrs.impl.tl.ThreadLocalMessageContext.get(ThreadLocalMessageContext.java:42)
at org.apache.cxf.jaxrs.utils.multipart.AttachmentUtils.getMultipartBody(AttachmentUtils.java:143)
at org.apache.cxf.jaxrs.utils.multipart.AttachmentUtils.getAttachments(AttachmentUtils.java:155)
Caused by: java.io.IOException: Couldn't find MIME boundary: ------WebKitFormBoundaryEsb6bxMwX39fG8Sb
at org.apache.cxf.attachment.AttachmentDeserializer.initializeRootMessage(AttachmentDeserializer.java:140)
at org.apache.cxf.attachment.AttachmentDeserializer.initializeAttachments(AttachmentDeserializer.java:110)
at org.apache.cxf.interceptor.AttachmentInInterceptor.handleMessage(AttachmentInInterceptor.java:58)
... 54 more
Is this issue occurring in the vanilla pack? Because this erroneous behavior is due to a known bug in the Tomcat version[1]. This issue has been identified and have fixed in the latest WUM updates.
Or else, you need to use a 9.0.34[2] bundle version and replace the appropriate jars. Also, new jars should be replaced in the bundle.info[3] as appropriate.
[1] https://github.com/wso2/product-apim/issues/8029
[2] https://maven.wso2.org/nexus/content/repositories/releases/org/wso2/orbit/org/apache/tomcat/tomcat-catalina-ha/9.0.34.wso2v1/
[3]
repository/components/default/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info

GLM Precompile Error In Julia Pro 1.0/1.2

Hello internet friends,
I am using the Julia Pro v.1.0.5-2 IDE to render animations for some Condensed Matter Physics data. When I attempt to run:
array = load("C:/Users/Kyle/Desktop/julia/data/Psi_L=89_W=0_0.01_500000-500/Psi_L=89_W=0_g=0.0_L^2.jld", "data")
#gif for i=1:7
array_2 = abs2.(array[i][:,:,1])
x=1:89
y=1:89
f(x,y) = array_2[x,y]
plot(x,y,f,st=:surface,camera=(0,30), title = "Wavefunction Density Animation, L=89, g=0, t = $(5*i)")
end
I get the following error:
[ Info: Precompiling GLM [38e38edf-8417-5370-95a0-9cbb8c7f171a]
ERROR: LoadError: No deps.jl file could be found. Please try running Pkg.bui
Currently, the build command might fail when Julia has been built from sourc
and the recommendation is to use the official binaries from julialang.org.
For more info see https://github.com/JuliaLinearAlgebra/Arpack.jl/issues/5.
ERROR: LoadError: LoadError: Failed to precompile Arpack [7d9fca2a-8960-54d3aPro_v1.0.5-2\compiled\v1.0\Arpack\X5VZL.ji.
in expression starting at C:\Users\Kyle\.juliapro\JuliaPro_v1.0.5-2\packages
in expression starting at C:\Users\Kyle\.juliapro\JuliaPro_v1.0.5-2\packages
ERROR: LoadError: Failed to precompile PDMats [90014a1f-27ba-587c-ab20-58faa-2\compiled\v1.0\PDMats\wuzEE.ji.
in expression starting at C:\Users\Kyle\.juliapro\JuliaPro_v1.0.5-2\packages
ERROR: LoadError: Failed to precompile Distributions [31c24e10-a181-5473-b8e_v1.0.5-2\compiled\v1.0\Distributions\xILW0.ji.
in expression starting at C:\Users\Kyle\.juliapro\JuliaPro_v1.0.5-2\packages
ERROR: LoadError: Failed to precompile GLM [38e38edf-8417-5370-95a0-9cbb8c7fcompiled\v1.0\GLM\6OREG.ji.
When I attempt to run:
Pkg.build("Arpack")
I get the following error:
Pkg.build("Arpack")
Building Arpack → `C:\Users\Kyle\.juliapro\JuliaPro_v1.0.5-2\packages\Arpa
┌ Error: Error building `Arpack`:
│ ┌ Warning: Platform `x86_64-w64-mingw32-libgfortran4` is not an officially
│ └ # BinaryProvider C:\Users\julia\AppData\Local\Julia-1.0.5\share\julia\st
It is important to mention that I had produced several animations with no problems with the same exact code. I stopped to go through some emails and when I tabbed back and ran the code with new parameters, it broke as I described. Furthermore, all the relevant packages are installed (except the ones that threw these errors) and "using [xpackage]" are sprinkled in appropriately.
Thanks for taking the time to read!
Unfortunately, Arpack >=0.3.2 is incompatible with JuliaPro 1.2.0-1. To work aound this issue, you can either ] add Arpack#0.3.1 or install JuliaPro version 1.2.0-2.

Julia SLURM script erropr

I have installed Julia on a remote High Performance Computing centre and am in the process of calling .jl-files via SLURM batch script. However, it seems like the "Pkg" command is not available because the following message pops up:
ERROR: LoadError: UndefVarError: Pkg not defined
Stacktrace:
[1] top-level scope at /users/pa19/lanast/taskp/LAfem.jl:1
[2] include at ./boot.jl:328 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1105
[4] include(::Module, ::String) at ./Base.jl:31
[5] exec_options(::Base.JLOptions) at ./client.jl:287
[6] _start() at ./client.jl:460
in expression starting at /users/pa19/lanast/taskp/LAfem.jl:1
Could it be an issue with the installation of Julia? Does one have to provide the exact links for Julia to know where to fetch them from?
Thanks
Lysandros
Thank you fredrikekre and Przemyslaw. If instead I write the two lines
using Pkg
Pkg.installed()
then the following appears:
ERROR: LoadError: IOError: stat: permission denied (EACCES) for file "/users/apps/compilers/julia/1.3.1/share/julia/stdlib/v1.3/Pkg/src/Pkg.jl"
Stacktrace:
[1] stat(::String) at ./stat.jl:69
[2] isfile at ./stat.jl:311 [inlined]
[3] isfile_casesensitive at ./loading.jl:9 [inlined]
[4] entry_point_and_project_file_inside at ./loading.jl:438 [inlined]
[5] entry_point_and_project_file(::String, ::String) at ./loading.jl:453
[6] implicit_project_deps_get at ./loading.jl:605 [inlined]
[7] project_deps_get(::String, ::String) at ./loading.jl:308
[8] identify_package(::String) at ./loading.jl:220
[9] identify_package(::Base.PkgId, ::String) at ./loading.jl:206
[10] identify_package at ./loading.jl:200 [inlined]
[11] require(::Module, ::Symbol) at ./loading.jl:882
[12] include at ./boot.jl:328 [inlined]
[13] include_relative(::Module, ::String) at ./loading.jl:1105
[14] include(::Module, ::String) at ./Base.jl:31
[15] exec_options(::Base.JLOptions) at ./client.jl:287
[16] _start() at ./client.jl:460
in expression starting at /users/pa19/lanast/taskp/LAfem.jl:1
In order to build julia I use the script:
## LOAD MODULES ##
module purge # clean up loaded modules
# load necessary modules
module load intel/18.0.5
module load gnu/4.9.2
module load java/9.0
module load julia
## RUN CODE ##
date
julia LAfem.jl
date
I will check whether the master node has different hardware than the worker node. But generally, only one node is used for this job. Kind regards

How to use the module in Julia v0.7

I have the following set up: module xxxxx at the top of my file named xxxxx.jl
I go to do the following:
include("modules/xxxxx/xxxxx.jl")
using xxxxx
I get the following error:
ERROR: LoadError: ArgumentError: Package xxxxx not found in current path:
- Run Pkg.add("xxxxx") to install the xxxxx package.
Any suggestions? I don't have this error on Julia v0.6 only on v0.7!
Thanks!
Write
using .xxxxx
By using include function the module is loaded as a submodule of a current module.
E.g. if you included it in global scope then you can also write
using Main.xxxxx
But the syntax I gave at the top would work no matter if you are in Main module or you include a submodule in another module defined by you.

Julia 0.4.5: libz fails to load on Ubuntu

While I was attempting to use Requests in Julia, the following error was output:
julia> using Requests
INFO: Precompiling module Requests...
ERROR: LoadError: LoadError: error compiling version: could not load library "libz"
libz: cannot open shared object file: No such file or directory
while loading /home/michael/.julia/v0.4/Libz/src/lowlevel.jl, in expression starting on line 110
while loading /home/michael/.julia/v0.4/Libz/src/Libz.jl, in expression starting on line 11
ERROR: LoadError: Failed to precompile Libz to /home/michael/.julia/lib/v0.4/Libz.ji
while loading /home/michael/.julia/v0.4/Requests/src/Requests.jl, in expression starting on line 27
ERROR: Failed to precompile Requests to /home/michael/.julia/lib/v0.4/Requests.ji
in compilecache at ./loading.jl:400
I'm not knowledgeable enough in Julia to discern exactly what is happening, but here is the code from Libz.jl (line 11)...
include("lowlevel.jl")
...from lowlevel.jl (lines 103-110)...
# Functions
# ---------
function version()
return unsafe_string(ccall((:zlibVersion, zlib), Ptr{UInt8}, ()))
end
const zlib_version = version()
...and from Requests.jl (line 27)
using Libz
This problem has persisted after I've removed then reinstalled Libz, MbedTLS, and Requests, and after I've Pkg.update()'ed and restarted julia and my computer. Is anyone well enough versed in Julia to know how to fix this?
Per the comment by Gnimuc K and a tiny bit more research:
sudo apt-get install zlib1g-dev
installs zlib, which Julia needed. Once it was installed...
julia> Pkg.update()
julia> Pkg.build("Libz")
worked all the kinks out.

Resources