GAE SDK and Launcher fails to run - python

I've just installed GAE SDK on a new computer and it failed to start.
When I open GAE Launcher it warns about errors, and log file has this.
WARNING:root: Warning: Prerequisites for App Engine development are
missing!
A valid python binary must be available. In addition, the App
Engine SDK must be installed. Here are the current values we found:
python = None
App Engine SDK root = C:\Program Files (x86)\Google\google_appengine
Please install the missing pieces and restart the launcher. If
these are installed but the Launcher failed to find them, you can
configure their location by editing Launcher preferences.
The Launcher preferences can be modified by selecting Edit >
Preferences.
Traceback (most recent call last):
A long list of traces there.
I've re-installed both Python and GAE SDK. Checked the PATH variables.
It's: C:\python27\;C:\Program Files (x86)\Google\google_appengine\
But it doesn't work!
How could I fix this?
I would appreciate any help on this.
Upd. I tried removing C:/users/username/Google/google_appengine_projects.ini this file.
The project is addede to the Launcher but it freezes the time I'm starting it. (server doesn't start)
Logs are:
2013-11-29 10:05:14 Running command:
"['C:\Python27\python.exe', 'C:\Program Files
(x86)\Google\google_appengine\dev_appserver.py',
'--skip_sdk_update_check=yes', '--port=8080', '--admin_port=8000',
u'C:\Users\\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\\u0414\u0438\u0441\u043a
Google\Work\E\Adriatika\\app-engine\adriatika]"
>
> Traceback (most recent call last): File
> "GoogleAppEngineLauncher.py", line 42, in <module> File
> "wx\_core.pyc", line 7913, in __init__ File "wx\_core.pyc", line
> 7487, in _BootstrapApp File "launcher\app.pyc", line 53, in OnInit
> File "launcher\app.pyc", line 97, in _CreateModels File
> "launcher\maintable.pyc", line 35, in __init__ File
> "launcher\maintable.pyc", line 96, in _LoadProjects File
> "launcher\project.pyc", line 63, in ProjectWithConfigParser File
> "launcher\project.pyc", line 285, in _LoadFromConfigParser File
> "ConfigParser.pyc", line 520, in get ConfigParser.NoOptionError: No
> option 'name' in section: '0'

I found a temporary fix.
First of all I removed everything and installed Python from scratch.
I also installed a previous version of GAE SDK (1.8.7)
Then I moved my working folder. Cause it had cyrillic utf symbols in its title. And I guess GAE Parser didnt like those symbols.
After all that I could finally launch GAELauncher.

Related

Instal postgres sql in windows 10

I try to install the latest version of postgres sql using the latest version and the recommended set up.
However when I open the pg adming I receive this error.
Python Path: "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\python.exe"
Runtime Config File: "C:\Users\User\AppData\Roaming\pgadmin\runtime_config.json"
pgAdmin Config File: "C:\Program Files\PostgreSQL\13\pgAdmin 4\web\config.py"
Webapp Path: "C:\Program Files\PostgreSQL\13\pgAdmin 4\web\pgAdmin4.py"
pgAdmin Command: "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\python.exe C:\Program Files\PostgreSQL\13\pgAdmin 4\web\pgAdmin4.py"
Traceback (most recent call last):
File "../web/pgAdmin4.py", line 98, in <module>
app = create_app()
File "C:\Program Files\PostgreSQL\13\pgAdmin 4\web\pgadmin\__init__.py", line 347, in create_app
if not os.path.exists(SQLITE_PATH) or get_version() == -1:
File "C:\Program Files\PostgreSQL\13\pgAdmin 4\web\pgadmin\setup\db_version.py", line 19, in get_version
return version.value
AttributeError: 'NoneType' object has no attribute 'value'
Any help on how to fix it?
After trying all the other suggestions without success, it finally worked for me now, with the way suggested here: Get fatal error: server could not be contacted when running pgAdmin4. 'NoneType' object has no attribute 'value'
Install the newest version of the standalone pgAdmin from https://www.pgadmin.org/download/pgadmin-4-windows/
(you can do the installation additionally to the existing bundled version, without having to remove anything before)
Delete the C:\Users\your_username\AppData\Roaming\pgadmin folder
(I restarted the postgres service once again)
Run the new pgAdmin as Administrator - it works!
Several people report that, from then on, even the old bundled version of pgAdmin works fine!
I resolved in this way:
I removed PGadmin from "Application Stack Builder"
download last version v4 5.2 (pgAdmin 4 v5.2 (released April 22, 2021)
installed...
lunched like admin... (error as usual)
clean-up folder C:\Users\XXXXX\AppData\Roaming\pgadmin (opsssss)
lunched like admin... All ran successfully!
Using all in one PGadmin with Application Stack gave me an usual error bind to some pyton or configuration file
Alen
I had a lot of trouble launching pgAdmin. Several solutions are there.
Try an older version of pgAdmin. The latest version might have unresolved issues.
Go to %APPDATA% (C:\Users{{your username}}\AppData\Roaming) folder and delete the pgadmin folder and run again.
go to environment variables (search environment on search bar) -> advanced, the click on Environment Variables. On System Variables click on path and set a new path for C:\Program Files\PostgreSQL\13\bin (the address might vary on your PC)

pydev debugger not working but can run code fine

I am using Liclipse which is basically pydev with eclipse. The python file runs fine but when I try to use the pydev debugger on the same file the debugger fails to launch and I couldn't find anything about this error. Is it a bug in pydev? It even says "During handling of the above exception, another exception occurred"
I am using python 3.7.1
warning: Debugger speedups using cython not found. Run '"C:\Users\q4116\AppData\Local\Programs\Python\Python37-32\python.exe" "C:\Program Files\Brainwy\LiClipse 5.1.0\plugins\org.python.pydev.core_7.0.0.201811071259\pysrc\setup_cython.py" build_ext --inplace' to build.
pydev debugger: starting (pid: 20104)
Traceback (most recent call last):
File "_pydevd_bundle\pydevd_cython_win32_37_32.pyx", line 134, in _pydevd_bundle.pydevd_cython_win32_37_32.set_additional_thread_info
AttributeError: '_MainThread' object has no attribute 'additional_info'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\Brainwy\LiClipse 5.1.0\plugins\org.python.pydev.core_7.0.0.201811071259\pysrc\pydevd.py", line 1951, in <module>
main()
File "C:\Program Files\Brainwy\LiClipse 5.1.0\plugins\org.python.pydev.core_7.0.0.201811071259\pysrc\pydevd.py", line 1945, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "C:\Program Files\Brainwy\LiClipse 5.1.0\plugins\org.python.pydev.core_7.0.0.201811071259\pysrc\pydevd.py", line 1295, in run
self.notify_thread_created(thread_id, t)
File "C:\Program Files\Brainwy\LiClipse 5.1.0\plugins\org.python.pydev.core_7.0.0.201811071259\pysrc\pydevd.py", line 662, in notify_thread_created
additional_info = set_additional_thread_info(thread)
File "_pydevd_bundle\pydevd_cython_win32_37_32.pyx", line 138, in _pydevd_bundle.pydevd_cython_win32_37_32.set_additional_thread_info
File "_pydevd_bundle\pydevd_cython_win32_37_32.pyx", line 147, in _pydevd_bundle.pydevd_cython_win32_37_32.set_additional_thread_info
File "_pydevd_bundle\pydevd_cython_win32_37_32.pyx", line 95, in _pydevd_bundle.pydevd_cython_win32_37_32.PyDBAdditionalThreadInfo.__init__
AttributeError: '_pydevd_bundle.pydevd_cython_win32_37_32.PyDBAdditionalThreadInfo' object has no attribute 'pydev_state'
Sorry about that. This is a bug in PyDev 7.0.0. I just finished uploading a new version for PyDev and LiClipse is almost there too (limiting factor is my internet connection speed, so, should be available in a few hours).
Meanwhile, removing the accelerators (and recreating if you want locally) should make it work again. i.e.: Remove _pydevd_bundle*.pyd and _pydevd_bundle\pydevd_frame_eval*.pyd and execute setup_cython.py locally (or don't if you're ok on going without the accelerator modules).
I had the same issue after an update of these packages :
Oomph Setup 1.11.0.v20181107-0652 org.eclipse.oomph.setup.feature.group Eclipse Oomph Project
PyDev for Eclipse 7.0.0.201811071319 org.python.pydev.feature.feature.group Fabio Zadrozny
PyDev for Eclipse Developer Resources 7.0.0.201811071319 org.python.pydev.feature.source.feature.group Fabio Zadrozny
Not running LiClipse but just Eclipse + pydev.
I solved it for now by reverting the update. Click Help > About Eclipse IDE > Installation Details > Installation History > Click on the last working version > Revert
I should have kept the error information though so that I could file a proper bug report ...

key error when running local app example with dev_appserver.py

I am trying to run the appengine-endpoints-helloendpoints-python app locally using the google cloud platform SDK (which has been added to my path) using the command dev_appserver.py from the command line. It used to run perfectly, but now when I try, I get an error:
Error processing line 2 of
/Users/hannah/anaconda3/envs/py27/lib/python2.7/site-packages/grpc_google_pubsub_v1-0.8.1-py2.7-nspkg.pth:
Traceback (most recent call last):
File "/Users/hannah/anaconda3/envs/py27/lib/python2.7/site.py", line 161, in addpackage
exec line
File "<string>", line 1, in <module>
KeyError: 'google'
Remainder of file ignored
It's in a anaconda python2.7 environment. I've tried looking in site.py but I can't follow it back to a clear missing link.
The appcfg.py command used to deploy from the command line doens't work at all anymore. The command is not found.
bash: appcfg.py: command not found
As I said, I reinstalled and authorised the google cloud SDK and it is added to my path and that hasn't solved anything.
Oh finally, the error comes up whenever I run the dev_appserver.py command, not just with the example code from google.
Any tips would be appreciated

Cannot start a console in newly installed Pycharm in Windows

On Windows 7 machine, Pycharm (community or professional) and Python 3.4 (tried Anaconda 3 as well) were installed newly. There were not problems running Python scripts interactively in main editor. However, when I tried to select View > Tool Windows > Python Console, it generates the following error messages and more. Basically, I couldn't bring up a console window in Pycharm.
C:\Users\user\Anaconda3\python.exe -u C:\Program Files (x86)\JetBrains\PyCharm 4.0.5\helpers\pydev\pydevconsole.py 56743 56744
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 4.0.5\helpers\pydev\pydev_imports.py", line 21, in <module>
from SimpleXMLRPCServer import SimpleXMLRPCServer
ImportError: No module named 'SimpleXMLRPCServer'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 4.0.5\helpers\pydev\pydevconsole.py", line 20, in <module>
import pydevd_vars
File "C:\Program Files (x86)\JetBrains\PyCharm 4.0.5\helpers\pydev\pydevd_vars.py", line 9, in <module>
from pydevd_xml import *
File "C:\Program Files (x86)\JetBrains\PyCharm 4.0.5\helpers\pydev\pydevd_xml.py", line 7, in <module>
from pydev_imports import quote
File "C:\Program Files (x86)\JetBrains\PyCharm 4.0.5\helpers\pydev\pydev_imports.py", line 23, in <module>
from xmlrpc.server import SimpleXMLRPCServer
File "C:\Users\user\Anaconda3\lib\xmlrpc\server.py", line 108, in <module>
from http.server import BaseHTTPRequestHandler
File "C:\Users\user\Anaconda3\lib\http\server.py", line 660, in <module>
class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
File "C:\Users\user\Anaconda3\lib\http\server.py", line 851, in SimpleHTTPRequestHandler
mimetypes.init() # try to read system mime.types
File "C:\Users\user\Anaconda3\lib\mimetypes.py", line 348, in init
db.read_windows_registry()
File "C:\Users\user\Anaconda3\lib\mimetypes.py", line 255, in read_windows_registry
with _winreg.OpenKey(hkcr, subkeyname) as subkey:
TypeError: OpenKey() argument 2 must be str without null characters or None, not str
Process finished with exit code 1
Couldn't connect to console process.
-----------------these messages were showed up in "Python Console"-------------
You need to change your working directory. Go to File->Settings->Build, Execution, Deployment->Console->Python Console and then change or provide a directory where you have read and write access in the Working directory box.
The configuring of pycharm in the presence of various development configurations is a bit of a black art IMHO.
The most effective mechanism I've found for pinning this down is put random strings into the various settings dialogs, Interpreters, consoles, tests , servers and observe the command lines submitted to the interpreter VERY carefully.
Hardly a satisfactory approach but it will sort out what is going where and to a certain degree what effects what.
The other think that helps me are screenshots of the settings and testing dialogs of working installations.
Again, a bit rough and ready but it has got me up and running again after a long period of successful debugging followed by pycharm amnesia.
I had same problem. I reinstalled python and default directories have changed.
Then I just refreshed interpreter here File->Settings->Build, Execution, Deployment->Console->Python Console and here File->Settings->Project: <YOUR_PROJECT>->Project Interpreter.
If you will open new projects interpreter will need choose again (?)
I got it resolved by setting the interpreter in Preferences and project interpreter.

Google App Engine Local Host Issue

I'm new to Google App Engine and I followed multiple video tutorials (One from Udacity) and for some reason I am unable to get it to run on the local host with the simple "Hello World" program.
I do have the Python SDK installed as well as the Google App Engine program installed. I did modify the YAML file so that it matches with my application (it did by default). When I click "run" in the Google App Engine launcher, it shows a yellow triangle caution sign next to the program I'm attempting to run.
When I type the localhost:8080 in the search bar it says:
This webpage is not available
I've also tried reinstalling both Python 2.7.9 and the Google App Engine and to no avail. In short I would like to understand why the program shows no content when I attempt to run it. Here are the log files if it's any help:
2015-03-14 18:36:21 Running command: "['E:\\Python\\pythonw.exe', 'C:\\Program Files (x86)\\Google\\google_appengine\\dev_appserver.py', '--skip_sdk_update_check=yes', '--port=8080', '--admin_port=8000', 'C:\\Program Files (x86)\\Google\\google_appengine\\new_project_template']"
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 83, in <module>
_run_file(__file__, globals())
File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 79, in _run_file
execfile(_PATHS.script_file(script_name), globals_)
NameError: name 'execfile' is not defined
2015-03-14 18:36:21 (Process exited with code 1)
It looks like the default pythonw on your system (E:\Python\pythonw.exe) is some version of Python 3. That's where execfile is indeed not defined (and the GAE launcher's incompatible with Py3 in other ways, anyway, at this time).
To verify, run E:\Python\python.exe at a cmd prompt -- it should greet you with a version banner which I bet will mention Python 3.something.
Where did you (re-)install 2.7.9? How's your PATH environment variable? Likely with E:\Python before wherever 2.7.9 is installed.
Simplest might be to change your PATH so that wherever 2.7.9 is installed comes before E:\Python...!

Categories