I am trying to integrate Dialoogflow V2 into my Python/Django WebApp in GAE Flexible Environment. I have followed all the steps from here, here and here.
The integration works fine locally. Once deployed on the Cloud (no errors on deployment), the application doesnt seem to find the dialogflow library, and throws the error:
ModuleNotFoundError at / No module named 'dialogflow'
Is there anything missing ? How can I get the dialogflow library into GAE Flex ?
Okay.
The problem was that the appengine_config.py file was not understood by the GAE.
The documentation here (https://cloud.google.com/appengine/docs/standard/python/tools/using-libraries-python-27#vendoring) is insufficient.
I included this (https://gist.github.com/jonparrott/4bdd7af14a676f33b099) in my appengine_config.py, excluding the imports of os.path and sys, and that did the trick !
Related
I've deployed my application on the Google App Engine python flexible runtime environment.
I thought to use a library (named as shap) which used to retrieve feature importance from the Random Forest model. I've mentioned its name in the requirement.txt while deploying to app engine.
I also noticed that the installation of c extension(dependency of shap library) has mentioned in the setup file of shap library.
Google Cloud App Engine (Flexible) is supposed to install this library with all dependencies including c extension, but when I run my application on the app engine, it starts getting following error:
name '_cext' is not defined.
here _cext is a c extension.
This library is working fine locally. It seems it has a problem with the app engine flexible environment.
Any help will be appreciated.
If the solution used locally relies exclusively on pip commands you may be able to use requirements.txt file options, see Requirements File Format.
But if you need something else besides executing pip operations then you probably have to build a custom runtime, see Up-to-date pip with AppEngine Python flex env?
I am very new to using APIs so please excuse me. I am currently using a Python-Django App service from IBM cloud app services and the IBM Watson Discovery resouce. I have followed all the steps given here:
https://console.bluemix.net/docs/apps/tutorials/tutorial_web.html#before-you-begin
I have a machine that has docker and so the app got built successfully. However I am lost as to how I am supposed to get the front end ( which I am writing in bootstrap, javascript ) to connect to the backend and link the API.
EDIT
For example : I want my app to accept documents, feed them in Discovery, extract the keywords and sentiments and display them in the UI. How do I know what to access from the server side code and what to link where in the UI.
It is a very broad question but its a compulsory project I need to do and I am clueless. Pleaassee Help !
Before you try to integrate an API, you will need to be familiar with Python and Django. If that is not the case, then you really need to go through a series of tutorials.
Then before deploying to the cloud, you will be better off running your Django app locally on your laptop. Use pip to install the watson-developer-cloud pypi module and use the API documentation to build the python code in your Django application - https://www.ibm.com/watson/developercloud/discovery/api/v1/python.html?python#query
If none of this makes sense, then you need to brush up on your knowledge of Python, Pip, and Django.
When you have the app running on your machine, then you will be ready to package it up into either a docker image or cloud foundry container and deploy to the cloud.
I'm a novice to coding and cloud storage and need some step by step guidance on how to set up my Eclipse so I could start working with Microsoft Azure Cloud storage.
So basically I'm following this tutorial for Azure file storage https://learn.microsoft.com/en-au/azure/storage/files/storage-java-how-to-use-file-storage
But when I tried to import the library to in my Eclipse, I got the error "the import cannot be resolved"
// Include the following imports to use blob APIs.
import com.microsoft.azure.storage.*;
import com.microsoft.azure.storage.file.*;
I guess I am missing some libraries. I previously learnt to adds some external libraries though Jar files, I searched for Jar for Azure cloud, but couldn't find any. This page seems relevant but I don't know how to use it. https://github.com/azure/azure-storage-java
Can someone please shed some light?
Thanks a lot.
I solved it.
For other novice programmer going through the same struggle, here is how I did it
1.Install Azure Toolkit for Eclipse, follow: https://learn.microsoft.com/en-us/java/azure/eclipse/azure-toolkit-for-eclipse-installation
2.Restart Eclipse
3.Rightclick the project you want to use the Azure library, then Properties>>Java Build Path>>Libraries tab>> Add Library>> Select Package for Microsoft Azure Libraries for Java>>Finish
I have created hybrid application with mobilefirst using ionic. I have included underscore.js library in my project. When I try to access methods of underscore, I get errors like underscore is not defined
If you mean that you have created an app using MobileFirst Studio - that is not the recommended path. The recommended path is to create a Cordova application using the MobileFirst CLI. You can then combine this with Ionic. This approach is more fool-proof.
You can follow these guides:
https://www.raymondcamden.com/2015/03/23/working-with-ibm-mobilefirst-and-the-ionic-framework/
https://mobilefirstplatform.ibmcloud.com/blog/2016/01/13/ionic-hybrid-mobile-app-using-mobilefirst-platform-7-1-cli/
Note that you did not mention the actual error you have received. Without this, the question is moot as there can be a number of possibilities. Please actually mention the error you got.
Is there anyone that has done a java interpreter using groovy-all jar file? Maybe sample or example can share it to me or teach me? I meant a interpreter that can parse string(java code) into the textarea and output it as a result like(hello world)
As you need some sample code to implement a web-console using groovy-all.jar, it would strongly recommend taking a look at Groovy Web Console.
Although it's not exactly a Java EE / Tomcat app and it is fairly similar as its a standard Java Servlets API 2.5 based web app. It runs on Google App Engine, which you can try out here. All you need from it is the script execution logic which for most of the part is not app engine specific. Keep in mind, it has dependencies on GAE Apis (through Gaelyk) so you should prune that part out of it to run in it outside Google App Engine.