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.
Related
when I type using Xpress it show me two errors. One is
LoadError: XPRESS cannot be loaded. Please run Pkg.build("Xpress")
and another is
Failed to precompile Xpress [9e70acf3-d6c9-5be6-b5bd-4e2c73e3e054] to C:\Users\cys\.julia\compiled\v1.6\Xpress\jl_7C6D.tmp.
I tried to solve it by Pkg.build("Xpress") but it show me
ERROR: Error building `Xpress`:
ERROR: LoadError: Unable to locate Xpress installation.
Please check your enviroment variable XPRESSDIR.
Note that Xpress must be obtained separately from fico.com.
using XpressPkg.build("Xpress")
Please follow the installation instructions mentioned here: https://github.com/jump-dev/Xpress.jl#install which go into the perquisites installs required before you can successfully type using Xpress.
I have seen this issue commonly since I started the transition to Julia v0.7 from v0.6. I am getting the following warning:
Warning: Package xxxxx does not have POMDPSimulators in its dependencies:
│ - If you have xxxxx checked out for development and have
│ added POMDPSimulators as a dependency but haven't updated your primary
│ environment's manifest file, try `Pkg.resolve()`.
│ - Otherwise you may need to report an issue with xxxxx
└ Loading POMDPSimulators into xxxxx from project dependency, future warnings for xxxxx are suppressed.
I do not understand why I get this warning. In one of my files, I do: using POMDPSimulators. Since I typed in that, I have done a resolve in the Pkg manager, and done a build POMDPSimulators in the package manager. This doesn't change the warning. How can I get rid of this warning?
Note: xxxxx is just the name of a file/project that is removed to make this post general.
Note: I asked a similar question here: [Julia ERROR: LoadError: ArgumentError: Package xxxx does not have ExcelReaders in its dependencies:
I already checked out the Julia documentation and did what it says. I added the package to the project by using the package manager and typing add POMDPSimulators.
Any suggestions to resolve this issue?
Note: If possible, I am looking for a general answer since I think I am going to have this issue with other packages as well. If there is any other documentation out there besides what was provided by JuliaLang I could appreciate that since I didn't find it helpful.
Link to the Julia Article about dependencies
I tried a pkg> update, build, and resolve. The issue isn't resolved. I see the file in my Manifest and Project file.
Here is what got the Warning to no longer show for me.
Go to your require file and type "NameOfPackageGivingWarning" on a new line.
Click "]" in Julia to open the package manager in Julia command line version:
up NameOfPackageGivingWarning
build NameOfPackageGivingWarning
resolve
activate NameOfPackageGivingWarning
This should resolve the issue for you. I am honestly unsure why this works and I may be taking more steps than necessary, but it resolved the issue for all of my package dependency warnings!
Just did a chef-solo run. I have my cookbook defined in ~/chef-repo/cookbooks/my-cookbook, and all the dependencies were installed by berkshelf in ~/.berkshelf/cookbooks
chef-solo -c solo.rb -j params.json
I keep running into an error from ohai. I gather that ohai is a library that provides environment configurations, and my nginx-2.7.6 cookbook relies on ohai (2.0.1).
[2015-06-25T15:19:08-04:00] DEBUG: RuntimeError: remote_directory[/etc/chef/ohai_plugins for cookbook ohai] (ohai::default line 33) had an error: RuntimeError: cookbook_file[/etc/chef/ohai_plugins/README] (dynamically defined) had an error: RuntimeError: File files/default/plugins/README does not exist for cookbook ohai
I've looked into /etc/chef/ohai and it's right that there's no README there (that folder is empty, in fact). Not sure what it's looking for or how to solve this error.
Thanks!
According to ohai's supermarket readme it must be the first item on your runlist
https://supermarket.chef.io/cookbooks/ohai#readme
Give that a shot and see if it works.
I have a Java project using play framework v2.3. I have the following line in the build.sbt file:
play.Project.playJavaSettings
However, now that I start activator, I get the following error:
[info] Loading project definition from /home/username/typesafe/testProj/project
/home/username/typesafe/testProj/build.sbt:60: error: object Project is not a member of package play
play.Project.playJavaSettings
^
[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
I have tried the following but I was not able to resolve the build file loading issue
playJavaSettings
Removing the line works. I am still looking into if this line really is required for a Java project or not.
playJavaSettings is not available anymore in Play 2.3, since Play is now added via the auto plug mechanism. Check the migration guide for 2.3 which states that:
Play itself is now added using the auto plugin mechanism. The
mechanism used in Play 2.2 where playJavaSettings and
playScalaSettings were used has been removed. You now use one of the
following instead
lazy val root = (project in file(".")).enablePlugins(PlayJava)
I have install Groovy 2.1.1 in my unix box. While executing groovysh getting the below error.
Exception in thread "main" java.lang.NoClassDefFoundError: error:
Caused by: java.lang.ClassNotFoundException: error:
at java.net.URLClassLoader.findClass(URLClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:660)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:346)
at java.lang.ClassLoader.loadClass(ClassLoader.java:626)
Could not find the main class: error:. Program will exit.
What could be the possible root cause for this error...???
Somewhere, you try to use the class error: (and yes, Groovy thinks that the colon is part of the class name), either in the script you execute (i.e. there must be new error: somewhere) or you wrote something like groovysh error: or you import error: (maybe indirectly)
Since you are using IBM J9, according to the Grails FAQ, the J9 need an argument to work well with Groovy, otherwise you may get a NoClassDefFound error:
Add -Xverify:none to JVM arguments
Download Groovy Binary From http://groovy.codehaus.org/Download
Download zip: Binary Release
Extract Local Disk say D;\GROOVY\ groovy-2.3.9
It contains the Folder Structure
D:.
├───bin
├───conf
├───embeddable
├───indy
├───lib
└───META-INF
Go to Control Panel\User Accounts\User Accounts Change My Environment Variables
Set/new GROOVY_HOME = D:\GROOVY\groovy-2.3.9 (don’t put : semicolon)
Set PATH = C:\Program Files\Java\jdk1.8.0_25\bin;%GROOVY_HOME%\bin;
Add groovy-all.jar to CLASSPATH
D:\ GROOVY\ \groovy-2.3.9\embeddable\groovy-all-2.3.9.jar;.
Close and Open Command and Say –groovy
For console -groovyConsole