Open gspeiliu opened 3 years ago
Hi!
You need to create a .env file with two keys related to the translation of the strings:
API_KEY="your-api-key" GATEWAY="your-gateway"
both keys are provided by IBM when the Watson Language Translation service is created.
that .env file must be located at the same level of the ITDroid-1.0.0.jar file.
If you have any other problem running the program let me know.
Hi!
You need to create a .env file with two keys related to the translation of the strings:
API_KEY="your-api-key" GATEWAY="your-gateway"
both keys are provided by IBM when the Watson Language Translation service is created.
that .env file must be located at the same level of the ITDroid-1.0.0.jar file.
If you have any other problem running the program let me know.
Where can I generate GATEWAY. It requires API definition (JSON or YAML file) or base path for the API when I tried to generate GATEWAY. Am I right to generate the GATEWAY in the site https://cloud.ibm.com/apis/api-gateway/legacy/new?view=providerView&env_id=ibm:yp:us-south?
Thanks. :-)
after generatinmg the service, yo can go to https://cloud.ibm.com/resources and under services, you can click on the translation service, It will show you the information of your API key and your url for using the service, that url is what should be use as gateway
Thanks for your quick response. So, you mean I can go to the site https://cloud.ibm.com/resources once I generate the gateway service. However, what is the JSON or YAML file that I can upload to generate the API gateway proxy service? In addition, could you please give us an example of the Gateway and the instructions to generate the necessary keys. Thank you. :-)
Sorry for not being more clear, you do not need to create a gateway service.
you only need to create a Watson Language Translation service, once that translation service is created you will see the API_KEY and the URL in the main page of your service
Here is a step by step (after creating the Watson Language Translation service):
API_KEY="your_api_key"
GATEWAY="https://api.us-south.language-translator.watson.cloud.ibm.com/instances/3e27b6b9-3384..."
Thanks for your patience. The .env file has been added. However, it shows the error message java.io.FileNotFoundException: /$HOME/ITDroid/results/noTrnsResults/es/result.json (No such file or directory) when I tried to run on my local environment. Actually, it can successfully generate mutated APK (SUCCESS: The mutated APK has been generated.). Do you have any suggestions about the error?
Error messages:
Building mutant
Signing mutant
SUCCESS: The mutated APK has been generated.
Going through your app..............................The app has been inspected
java.io.FileNotFoundException: /$HOME/ITDroid/results/trnsResults/en/result.json (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.
Hi, that might be due to an error of the exploration tool, so it might be a missing environment variable.
Make sure that you have Android SDK installed in your computer and that you have the next two environment variables:
Hi, I find that the error message shows if the emulator quits after one language has been analyzed completely. I cannot open the emulator on time after one language analysis finish before the next language starts to be handled just like the third video clip (ITDroid demo2) on the official site. How can I open the emulator after one language analysis finish while before the next one starts?
Hi,
I followed the instructions and tried the tool in my local environment. However, it shows the error messages as following when I tried the analysis command. io.github.cdimascio.dotenv.DotEnvException: Could not find ./.env on the classpath at io.github.cdimascio.dotenv.internal.ClasspathHelper.loadFileFromClasspath(ClassPathHelper.kt:37) at io.github.cdimascio.dotenv.internal.DotenvReader.read(DotenvReader.kt:36) at io.github.cdimascio.dotenv.internal.DotenvParser.parse(DotenvParser.kt:26) at io.github.cdimascio.dotenv.DotenvBuilder.load(Dotenv.kt:111) at io.github.cdimascio.dotenv.Dotenv$Instance.load(Dotenv.kt:32) at io.github.cdimascio.dotenv.Dotenv.load(Dotenv.kt) at uniandes.tsdl.itdroid.IBM.IBMTranslator.translate(IBMTranslator.java:49) at uniandes.tsdl.itdroid.translator.Translator.translate(Translator.java:20) at uniandes.tsdl.itdroid.ITDroid.runITDroid(ITDroid.java:152) at uniandes.tsdl.itdroid.ITDroid.main(ITDroid.java:43) Suppressed: io.github.cdimascio.dotenv.DotEnvException: Could not find ./.env on the file system (working directory: /$HOME/ITDroid) at io.github.cdimascio.dotenv.internal.DotenvReader.read(DotenvReader.kt:40) ... 8 more
Do you have any advice?
Thank you.