I've created a nose test config in PyCharm. I have NoseGAE installed in the virtualenv where I'm working. Running tests from the terminal with ./env/bin/nosetests --with-gae src/tests works great. The PyCharm test config, however, yields
/Users/bistenes/Code/myproject/env/bin/python /Applications/PyCharm.app/Contents/helpers/pycharm/noserunner.py src/tests/
Testing started at 6:31 PM ...
/Users/bistenes/Code/myproject/env/lib/python2.7/site-packages/nose/plugins/manager.py:395: RuntimeWarning: Unable to load plugin nosegae = nosegae:NoseGAE: nose>=0.10.1
RuntimeWarning)
Config is set to Nosetests, "All in folder" src/tests. The error happens whether or not --with-gae is passed as a param.
The ensuing failures are indicative of NoseGAE not being loaded:
AssertionError: No api proxy found for service "datastore_v3"
Make sure you have the latest pkg_resources by running pip install --upgrade setuptools. Then add the version of pkg_resources you want to be using to the front of your path. In PyCharm you can do this by adding an environment variable to the test configuration: PYTHONPATH=/path/to/site-packages:$PYTHONPATH.
This is happening because PyCharm, when support for Google App Engine is enabled (under "Languages & Frameworks"), inserts a bunch of GAE SDK directories to the front of the PYTHONPATH. The Python GAE SDK ships with setuptools-0.6c11, a version of setuptools from 2009. This has a very old version of pkg_resources bundled with it, which doesn't work with newer nose plugins.
Related
i will just start my question a little bit structured:
background information
I am developing a React App with Electron on my Mac.
The customer uses this app on Windows 7 and 10.
The app is packaged with asar on a gitlab runner within a docker
the dockerfile for the runner is from electronuserland/builder:base
What works?
If I start the App locally I run the npm build script and start electron -> The app works fine!
If I package the App locally (on my Mac) for Windows and copy the .exe to my VM: -> The app works fine!
What does not work?
If my pipeline get triggered by my commit the gitlab runner starts to run the buildscript and the package script (The same ones I run locally for packaging and running my app) The build is "successfully" completed and the artifacts are stored on gitlab.
Then I download the .exe from the gitlab artifacts on my Windows VM and install the software. This absolutely works fine. The app can start up and some functions are pretty good working.
But there is a problem with a package (or maybe some more, i do not know yet) It is the react-bootstrap-daterangepicker. It gives me an JS error with $this.$picker.daterangepicker is not a function
I googled a lot and found existing problems with the package, but I do not understand why it is working when i package the app locally and not with the runner.
I removed my node-modules completey on my local machine and reinstalled them, and it is still working fine.
Do you have any idea?
Where could be a difference between my local environment and the runner environment that can cause this kind of problem?
I am pretty stuck in this problem, and you would be my hero if you can help me to fix this!
Have a nice day!
electron-builder recommends using electronuserland/builder:wine to build Windows targets. I'm not sure if this would fix the problem, but could you try using this image instead?
electronuserland/builder:wine — Wine, NodeJS 10 and required system dependencies. Based on builder:10. Use this image if you need to build Windows targets.
For more information: https://www.electron.build/multi-platform-build#provided-docker-images
I have a problem updating wordpress or installing wordpress plugin in my local version of google app engine. I get the following message.
Downloading install package from
https://downloads.wordpress.org/plugin/event-espresso-decaf.4.8.38.decaf.zip…
Unpacking the package…
Could not create directory.
With the same code base I am able install plugin using MAMP (Macintosh, Apache, MySQL, and PHP). However fails with google Pyton script (dev_appserver.py).
I tried changing the permission of the file system by giving privilege to all user for write. Tried executing as sudo dev_appserver.py .. Followed the advice in other post, No luck.
Whats the problem here?, With MAMP all looks good in my local, but the same code break as I deploy to GAE (appcfg.py -A APP-ID update app.yaml). Whats the problem here
Cannot write to file on Google App Engine Dev server with PHP?
Staring SDK 1.9.18, dev_appserver disables local file writing by default to better simulate the production environment. You can enable file writing by adding "google_app_engine.disable_readonly_filesystem=1" to your php.ini file.
I also wrote a blog post about running WordPress on App Engine flexible environment at:
https://wp.gaeflex.ninja/2016/03/25/using-wordpress-multisite/
Please give it a try too.
Strange error when deploying to GAE from Cloudbees DEV#cloud Jenkins instances:
[cloudbees-deployer] Deploying as stuart.langridge#PROJECTNAME.com to Google App Engine
[cloudbees-deployer] Deploying PROJECTNAME
[cloudbees-deployer] Resolved from workspace as /scratch/jenkins/workspace/PROJECTNAME/PROJECTNAME
ERROR: Couldn't find path for tool 'GAE Python SDK 1.7 (latest)'
com.cloudbees.plugins.deployer.exceptions.DeployException: No {0} SDK available for node.
at com.cloudbees.plugins.deployer.impl.google.PythonEngineImpl$DeployActorImpl.<init>(PythonEngineImpl.java:224)
at com.cloudbees.plugins.deployer.impl.google.PythonEngineImpl.newDeployActor(PythonEngineImpl.java:62)
at com.cloudbees.plugins.deployer.impl.google.PythonEngineImpl.newDeployActor(PythonEngineImpl.java:44)
at com.cloudbees.plugins.deployer.engines.Engine.process(Engine.java:159)
at com.cloudbees.plugins.deployer.engines.Engine.perform(Engine.java:100)
at com.cloudbees.plugins.deployer.DeployBuilder.perform(DeployBuilder.java:85)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:791)
at hudson.model.Build$BuildExecution.build(Build.java:199)
at hudson.model.Build$BuildExecution.doRun(Build.java:160)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:572)
at hudson.model.Run.execute(Run.java:1665)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:246)
Build step 'Deploy applications' marked build as failure
Recording test results
Now, this used to work. I install node as part of my test scripts, so Jenkins can use casperjs and phantom to run the test suite. However, the app itself doesn't use node (it's Python, on Google App Engine). The two relevant lines seem to be
ERROR: Couldn't find path for tool 'GAE Python SDK 1.7 (latest)'
com.cloudbees.plugins.deployer.exceptions.DeployException: No {0} SDK available for node.
and I do not understand what's looking for a path, or why there'd be an SDK needed for node. (I think that "node" there does not mean "nodejs"; I think it means "this node that Jenkins is running on; i.e., a computer".)
So, why can't the deployer find an SDK? More importantly, how can I fix it?
AppEngine SDK 1.7 isn't supported anymore, and has been removed from build slaves. Change your jenkins instance configuration to use the 1.8 SDK
I am using Indigo on a Mac Pro (10.9.1). I updated to Java1.7 in order to run some updated Google Play Service samples. Under Installed JREs, JAVA7 is shown as the only and default choice, which points to the new Java path. But when I start Eclipse, it started complaining that "JRE version is 1.6.0; version 1.7.0 or later is needed to run Google plugin for Eclipse".
I tried to add the vm option in eclipse.ini, i.e. I added
-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/home/bin/java
above "-vmargs" as described here: http://wiki.eclipse.org/Eclipse.ini.
It doesn't make any difference though. Since then, I have uninstalled GPE from Eclipse and installed them again via "install new software" from https://dl.google.com/eclipse/plugin/3.7. Still the same problem. Under Google->App Engine, there is an error message "Failed to initialize App Engine SDK (path)". This points to appengine-java-sdk-1.8.9.
I have checked my Java version using all means I am aware of, i.e. from run Java -version, using Java's control panel, output from code... They all show I am using Java 1.7.0.51.
Any help is appreciated!
Edit: Google has provided a solution that works great. Add this argument in eclipse.ini
-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_WHATEVERTHESUFFIXIS/Contents/Home/jre/lib/server/libjvm.dylib
Make sure that eclipse Is compiling your project to 1.7 specifications. Even though you have 1.7 selected as your virtual machine, it might be compiling to 1.6. It's in the eclipse project settings
I use the Google App Engine SDK 1.8.5 with Eclipse 3.8 on Ubuntu.
I want to add the Cloud Storage service to my app, so I downloaded guava-gwt-15.0.jar and appengine-gcs-client-0.3.jar, and put them in my apps /war/WEB-INF/lib/ folder. I also added these jars to the build path in Eclipse.
When I fire up my app in dev mode, it runs fine, at least until I try to access a page relevant to the GCS library. When I do that, I get the following error:
java.lang.NoClassDefFoundError: com/google/common/base/Preconditions
at com.google.appengine.tools.cloudstorage.GcsServiceImpl.<init>(GcsServiceImpl.java:35)
at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:32)
... etc
I cleaned my project and restarted Eclipse multiple times, and still the problem persists. What to do?
In addition to Guava for GWT, you also need the core Guava library (guava-15.0.jar). Download the .jar to war/WEB-INF/lib and add it to you build path as well.