I try to run a grails app thanks to grails run-app command. Version I use is grails 2.2.3.
All imports failed and I've got the "unable to resolve class" about all import line. For example :
unable to resolve class com.octo.captcha.component.image.backgroundgenerator.GradientBackgroundGenerator
Errors are about the following lines :
import com.octo.captcha.service.multitype.GenericManageableCaptchaService
import com.octo.captcha.engine.GenericCaptchaEngine
import com.octo.captcha.image.gimpy.GimpyFactory
import com.octo.captcha.component.word.wordgenerator.RandomWordGenerator
import com.octo.captcha.component.image.wordtoimage.ComposedWordToImage
import com.octo.captcha.component.image.fontgenerator.RandomFontGenerator
import com.octo.captcha.component.image.backgroundgenerator.GradientBackgroundGenerator
import com.octo.captcha.component.image.color.SingleColorGenerator
import com.octo.captcha.component.image.textpaster.NonLinearTextPaster
Here you can read these 2 files : Config.groovy and the return of "grails run-app" to help you : http://dl.free.fr/vPbCJEUnN
Thanks for your help !
Related
can you please tell me how can I import a function from poly.py to query.py
this is the directories tree :
my_project
|_dataset
|_execute
|__poly.py
|_search
|__query.py
|_determine
|_optimize
|_transmit
NB : my python version is 3.6.2 > 3.3 so _init.py is unuseful
You need put those files in 1 folder and do import filename or from filename import function
I am new to Ray and wanted to set up a cluster with some dependencies. I first set up a cluster with some dependencies supported out of the box and everything worked fine. Now, I have the following scenario that I simplified to this demonstration. There is a problem with joblib even though I specify it in a runtime env as to be downloaded with pip and then pass it to ray.init.
from ray.util.joblib import register_ray
import joblib
import ray
import numpy as np
# connect to ray
runtime_env={"pip": ["joblib"]}
ray.init(address='auto', _redis_password=..., runtime_env=runtime_env)
#ray.remote(num_cpus=1)
def train_ray(...):
...
register_ray()
with joblib.parallel_backend('ray'):
...
return ...
I get the following error:
from ray.util.joblib import register_ray
File "/home/ray/anaconda3/lib/python3.7/site-packages/ray/util/joblib/__init__.py", line 1, in <module>
from joblib.parallel import register_parallel_backend
ModuleNotFoundError: No module named 'joblib'
command terminated with exit code 1
Thanks for any suggestions.
I'm trying to integrate highcharts to my jhipster Gateway using angular 4.
In the command line I used
>yarn add angular-highcharts#4
> yarn add --dev #types/highcharts#4
but i got this error :
./node_modules/angular-highcharts/angular-highcharts.es5.js
Module not found: Error: Can't resolve 'highcharts' in '/home/vagrant/IdeaProjects/chart/node_modules/angular-highcharts'
When I opened ./node_modules/angular-highchartsangular-highcharts.es5.js:
I got:
this import is not supported by current javascriptversion
import * as Highcharts from 'highcharts';
import { Directive, ElementRef, Inject, Injectable, InjectionToken, Input, NgModule } from '#angular/core';
Am I missing a setting somewhere?
I'm trying to implement a nouislider on Rails. I installed it with Yarn and my package.json confirms this: "nouislider": "^11.1.0".
Unfortunatly I got this error on the chrome console :
Uncaught ReferenceError: noUiSlider is not defined at Object. (slider2.js:12)
here is my app/javascript/packs/application.js :
import "nouislider";
import '../components/slider2';
(where slider2.js is my noUiSlider script)
What is wrong with this importation? Why does slider2.js don't understand what is noUislider?
Try:
import noUiSlider from "nouislider";
Also going to a assume you have a file in the correct place for your second line.
I need to use some classes in httpclient.jar when building a project in Jenkins. I added this jar to both {Groovy_Classpath}\lib and {Jenkins_Path}\plugins\groovy\WEB-INF\lib and tried to imported into my job (also see the screenshot below):
import jenkins.model.*
import hudson.model.*
import groovy.*
import org.apache.http.*
HttpClient httpClient = HttpClientBuilder.create().build();
It has two issues:
startup failed:
Script1.groovy: 6: unable to resolve class HttpClient
# line 6, column 12.
HttpClient httpClient = HttpClientBuilder.create().build();
^
1 error
So I removed HttpClient and saw another:
Caught: groovy.lang.MissingPropertyException: No such property: HttpClientBuilder for class: xxxx
groovy.lang.MissingPropertyException: No such property: HttpClientBuilder
I guess probably they meant the same thing - the class couldn't be found. But I have no idea how to resolve as I've added the jar to classpath...
Updated on the basis of Mike W's suggesion
Try getting the dependency using Grape, add the following to the top of your script.
#Grab(group='org.apache.httpcomponents', module='httpclient', version='4.5.3'))