Trying to Run Google App Engine behind a proxy, errors received - python

I am running Python 2.6.1 on my computer, and just installed google App Engine.
As soon as I click on the App Engine Launcher, it gives an error dialog box and asks me to check the GoogleAppEngineLauncher.exe file for more details.
I have appended the log file below:
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 58, in OnInit
File "launcher\app.pyc", line 152, in _VersionCheck
File "urllib.pyc", line 82, in urlopen
File "urllib.pyc", line 190, in open
File "urllib.pyc", line 338, in open_http
File "urllib.pyc", line 351, in http_error
File "urllib.pyc", line 702, in http_error_407
File "urllib.pyc", line 714, in retry_proxy_http_basic_auth
File "urllib.pyc", line 773, in get_user_passwd
File "urllib.pyc", line 782, in prompt_user_passwd
EOFError: EOF when reading a line
From the file, I get the feeling that it's about giving the right proxy details.
I have checked up http://code.google.com/p/google-appengine-wx-launcher/issues/detail?id=17
and http://code.google.com/p/googleappengine/issues/detail?id=544.
It seems that it is about making some edits to some particular .py file so that I can enter my proxy settings, and username/password.
I have also come across few suggestions telling me to set the proxy in environment variables at the command prompt - but that hasn't worked. Any suggestions, please?
UPDATE:
I came across the following at nomagon dot com /?p=5 I am using it but unable to make sense out of the appcfg.py file
If your're not behind a proxy, then your ok to go! You can use the deploy button inside the App Engine Launcher, however if you're behind a proxy, you will need to set some variables
In a CMD window:
set HTTP_PROXY=<proxy>
set HTTPS_PROXY=<prox>
In a CMD window:
appcfg.py update <path to app>

Related

Errors while running Kivy after PyInstaller: pyi_rth_pkgres, wordcount.kv, unable to get a window etc

I need to compile a standalone executive or --onedir version of it for my Kivy application for Windows using PyInstaller. I experience problems one after another, and this is why I post it here. I can find solutions for almost all of them, but it seems that something goes wrong from the beginning.
The program consists of .py and .kv file, requires (apart from Kivy modules) only Textract (imported as txt) and works perfectly if I use shell of IDLE.
I use the latest versions of Kivy and PyInstaller (in case if PyInstaller I also tried developer version, as some people suggested).
The first problem I encounter is
ModuleNotFoundError: No module named 'pkg_resources.py2_warn'
[4808] Failed to execute script pyi_rth_pkgres
which I solve with
pyinstaller wordcount.py --hiddenimport pkg_resources.py2_warn
as some people suggested to deal with this issue before. Then, full of pleasant expectations, I run the .exe again and get this:
FileNotFoundError: [Errno 2] No such file or directory: 'wordcount.kv'
[3356] Failed to execute script wordcount
Obviously, the .kv was somehow not included in the package, okay, I change my command again:
pyinstaller wordcount.py --add-data "./wordcount.kv;." --hiddenimport pkg_resources.py2_warn
manually forcing the .kv into package. Or I could just copy it there - with the same result:
[WARNING] [Image ] Unable to load image <C:\GUI Projects\wordcount\dist\wordcount\kivy_install\data\glsl\default.png>
[CRITICAL] [Window ] Unable to find any valuable Window provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes
sdl2 - Exception: SDL2: Unable to load image
File "site-packages\kivy\core\__init__.py", line 71, in core_select_lib
File "site-packages\kivy\core\window\window_sdl2.py", line 152, in __init__
File "site-packages\kivy\core\window\__init__.py", line 981, in __init__
File "site-packages\kivy\core\window\window_sdl2.py", line 312, in create_window
File "site-packages\kivy\core\window\__init__.py", line 1258, in create_window
File "kivy\graphics\instructions.pyx", line 783, in kivy.graphics.instructions.RenderContext.__init__
File "site-packages\kivy\core\image\__init__.py", line 561, in __init__
File "site-packages\kivy\core\image\__init__.py", line 756, in _set_filename
File "site-packages\kivy\core\image\__init__.py", line 460, in load
File "site-packages\kivy\core\image\__init__.py", line 223, in __init__
File "site-packages\kivy\core\image\img_sdl2.py", line 47, in load
[CRITICAL] [App ] Unable to get a Window, abort.
as people suggest, onw may just copy .dlls to the directory ([Dist]\\libpng16-16.dll). Or to rewrite spec. like this:
... regrettably, without any positive result.
Traceback (most recent call last):
File "wordcount.py", line 47, in <module>
WordCount().run()
File "site-packages\kivy\app.py", line 855, in run
File "site-packages\kivy\base.py", line 504, in runTouchApp
File "site-packages\kivy\core\window\window_sdl2.py", line 747, in mainloop
File "site-packages\kivy\core\window\window_sdl2.py", line 479, in _mainloop
File "site-packages\kivy\base.py", line 339, in idle
File "site-packages\kivy\clock.py", line 591, in tick
File "kivy\_clock.pyx", line 384, in kivy._clock.CyClockBase._process_events
File "kivy\_clock.pyx", line 414, in kivy._clock.CyClockBase._process_events
File "kivy\_clock.pyx", line 412, in kivy._clock.CyClockBase._process_events
File "kivy\_clock.pyx", line 167, in kivy._clock.ClockEvent.tick
File "site-packages\kivy\uix\filechooser.py", line 698, in _update_files
File "site-packages\kivy\uix\filechooser.py", line 718, in _create_files_entries
File "site-packages\kivy\uix\filechooser.py", line 839, in _generate_file_entries
File "site-packages\kivy\uix\filechooser.py", line 871, in _add_files
File "site-packages\kivy\uix\filechooser.py", line 871, in <listcomp>
File "site-packages\kivy\uix\filechooser.py", line 178, in is_hidden
ModuleNotFoundError: No module named 'win32timezone'
[10576] Failed to execute script wordcount
Moreover, I'm pretty sure this is just the beginning. Is there any other solution?
Any help will be appreciated. I know these issues were discussed before, and I apologize in advance, but non of the solutions I found work for me.
PS: the list of "missing modules" in warn.txt is long as the Great Wall of China, is it normal? Especially considering that only two modules are in use.
Well, I solved the issue, but the solution is not very elegant:
pyinstaller --add-data "./wordcount.kv;." --hiddenimport pkg_resources.py2_warn --hiddenimport win32timezone --hiddenimport textract.parsers.pptx_parser --hiddenimport textract.parsers.docx_parser wordcount.py
Then I copied libpng16-16.dll from one of the Python folders to the /dist/ folder.
If somebody knows better way please share it...

Installing Google Cloud SDK throwing error in install.py when using install.bat

I am trying to install google cloud SDK using install.bat. I have tried downloading the bundled pythons versions 275 and current version 276, they both fail at the same spot. It is able to find python in the platform/bundledpython folder so that is not the issue. I have also tried the suggestions online including making sure that the "Find" command works on a command prompt. Any help appreciated.
The latest available version is: 276.0.0
���───────────────────────────────────────────────────────────────────────────────────────────────────────────────┐Trac
back (most recent call last):
File "C:\google-cloud-sdk\google-cloud-sdk\\bin\bootstrapping\install.py", line 225, in <module>
main()
File "C:\google-cloud-sdk\google-cloud-sdk\\bin\bootstrapping\install.py", line 203, in main
Install(pargs.override_components, pargs.additional_components)
File "C:\google-cloud-sdk\google-cloud-sdk\\bin\bootstrapping\install.py", line 148, in Install
_CLI.Execute(['--quiet', 'components', 'list'])
File "C:\google-cloud-sdk\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 1007, in Execute
self._HandleAllErrors(exc, command_path_string, specified_arg_names)
File "C:\google-cloud-sdk\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 1040, in _HandleAllErrors
exceptions.HandleError(exc, command_path_string, self.__known_error_handler)
File "C:\google-cloud-sdk\google-cloud-sdk\lib\googlecloudsdk\calliope\exceptions.py", line 527, in HandleError
core_exceptions.reraise(exc)
File "C:\google-cloud-sdk\google-cloud-sdk\lib\googlecloudsdk\core\exceptions.py", line 146, in reraise
six.reraise(type(exc_value), exc_value, tb)
File "C:\google-cloud-sdk\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 981, in Execute
resources = calliope_command.Run(cli=self, args=args)
File "C:\google-cloud-sdk\google-cloud-sdk\lib\googlecloudsdk\calliope\backend.py", line 809, in Run
display_info=self.ai.display_info).Display()
File "C:\google-cloud-sdk\google-cloud-sdk\lib\googlecloudsdk\calliope\display.py", line 483, in Display
self._printer.Print(self._resources)
File "C:\google-cloud-sdk\google-cloud-sdk\lib\googlecloudsdk\core\resource\resource_printer_base.py", line 279, in P
int
self.Finish()
File "C:\google-cloud-sdk\google-cloud-sdk\lib\googlecloudsdk\core\resource\table_printer.py", line 467, in Finish
self._out.write(line)
File "C:\google-cloud-sdk\google-cloud-sdk\lib\googlecloudsdk\core\log.py", line 239, in write
self._Write(plain_text, styled_text)
File "C:\google-cloud-sdk\google-cloud-sdk\lib\googlecloudsdk\core\log.py", line 232, in _Write
self.__stream_wrapper.stream.write(stream_msg)
I just had the same problem trying to install the latest Google Cloud SDK (276.0.0). The Windows setup was stuck on "Installing components".
Looking at the process list with Process Explorer I could see it was running this command that was stuck, as you probably did to get your stack trace. I took the command line and ran it in a separate Administror cmd.exe (paths might differ per system, the idea is the same).
cd "C:\Program Files (x86)\Google\Cloud SDK"
SET "CLOUDSDK_CORE_DISABLE_PROMPTS=1"
SET "CLOUDSDK_CONFIG=%APPDATA%\gcloud"
"C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\install.bat" --quiet --disable-installation-options --path-update "FALSE" --usage-reporting "true" --additional-components beta powershell"
Running them would produce the same error / stack trace.
Editing log.py and commenting out (prefix with #) line 232 would make it get further, but it runs into a separate problem:
ERROR: Cannot use bundled Python installation to update Cloud SDK in non-interactive mode.
Please run again in interactive mode.
Enable prompts with CLOUDSDK_CORE_DISABLE_PROMPTS envvar and remove --quiet and --disable-installation-options from the install.bat command line and run it again.
SET "CLOUDSDK_CORE_DISABLE_PROMPTS=0"
"C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\install.bat" --path-update "FALSE" --usage-reporting "true" --additional-components beta powershell"
This time it should continue, start a new console where it actually installs the components and eventually finish succesfully.

IPython NoConsoleScreenBufferError (Windows)

When running any line on the IPython CLI on Windows, most times I am getting a NoConsoleScreenBufferError and the console is terminated.
This happens when running IPython from the Windows terminal (cmd.exe > ipython) or when using the embedded PyCharm terminal (it uses the Windows terminal) which chooses IPython automatically over the regular Python terminal, in installed.
Here is part of the relevant trace:
File "C:\Python27\lib\site-packages\IPython\__init__.py", line 119, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "C:\Python27\lib\site-packages\traitlets\config\application.py", line 658, in launch_instance
app.start()
File "C:\Python27\lib\site-packages\IPython\terminal\ipapp.py", line 348, in start
self.shell.mainloop()
File "C:\Python27\lib\site-packages\IPython\terminal\interactiveshell.py", line 486, in mainloop
self.interact()
File "C:\Python27\lib\site-packages\IPython\terminal\interactiveshell.py", line 469, in interact
code = self.prompt_for_code()
File "C:\Python27\lib\site-packages\IPython\terminal\interactiveshell.py", line 363, in prompt_for_code
pre_run=self.pre_prompt, reset_current_buffer=True)
File "C:\Python27\lib\site-packages\prompt_toolkit\interface.py", line 392, in run
self._redraw()
File "C:\Python27\lib\site-packages\prompt_toolkit\interface.py", line 351, in _redraw
self.renderer.render(self, self.layout, is_done=self.is_done)
File "C:\Python27\lib\site-packages\prompt_toolkit\renderer.py", line 398, in render
size = output.get_size()
File "C:\Python27\lib\site-packages\prompt_toolkit\terminal\win32_output.py", line 103, in get_size
info = self.get_win32_screen_buffer_info()
File "C:\Python27\lib\site-packages\prompt_toolkit\terminal\win32_output.py", line 150, in get_win32_screen_buffer_info
raise NoConsoleScreenBufferError
NoConsoleScreenBufferError: No Windows console found. Are you running cmd.exe?
If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev#scipy.org
You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.
Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
%config Application.verbose_crash=True

How can I build Pinry (Python/Django Pinterest Clone) using PyCharm?

Before I get started please excuse the complete newbie question (request for dummy steps). I recently started learning Python and the Django framework using tools like Codecademy and Pluralsight and was hoping to dig into this by running Pinry (a Pinterest clone) using PyCharm, my IDE of choice for Python and work on modifying it with what I've learned so far to see what happens. Unfortunately, I download the latest version of Pinry and when I try to run it in PyCharm on my local machine I get all sorts of errors.
Here are the steps I take:
Python, Django, PyCharm are all installed and configured.
Download a new copy of Pinry and open the directory in PyCharm
Click on Run - Edit Configuration
Click on the + button to add a new configuration and check Run browse, select the Python interpreter (with Django) and click on Fix to enable Django support for the project
In the Project - Django settings, add the Django project root, settings and manage script
Finally hit alt/option + R and runserver to get the app started
At this point I would expect the package to run but instead I get the list of errors below.
Has anyone had any success in running Pinry in PyCharm without making any code modifications? I am just not sure if these are issues with the package or if its settings in PyCharm that need to be modified to make this work. Any insights?
THANK YOU!
File "/Applications/PyCharm.app/helpers/pycharm/django_manage.py", line 23, in <module>
run_module(manage_file, None, '__main__', True)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 176, in run_module
fname, loader, pkg_name)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 82, in _run_module_code
mod_name, mod_fname, mod_loader, pkg_name)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/hussein/Desktop/pinry-master/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", line 279, in execute
saved_locale = translation.get_language()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/utils/translation/__init__.py", line 154, in get_language
return _trans.get_language()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/utils/translation/__init__.py", line 52, in __getattr__
if settings.USE_I18N:
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/conf/__init__.py", line 54, in __getattr__
self._setup(name)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/conf/__init__.py", line 49, in _setup
self._wrapped = Settings(settings_module)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/conf/__init__.py", line 151, in __init__
raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
In PyCharm "Project settings/Django" specify "settings/development.py" in "settings" field.

Marmalade deploy - deployment.py, line 62, in SetOpt

I got a mac book pro retina and I'am trying to create a project from the .mkb file: but I got this error
Building project: /Users/sergioandreotti/Downloads/twins/template/marmalade/FeedtheTwins.mkb
Traceback (most recent call last):
File "/Developer/Marmalade/6.1/s3e/makefile_builder/mkb.py", line 209, in <module>
run()
File "/Developer/Marmalade/6.1/s3e/makefile_builder/mkb.py", line 137, in run
main(sys.argv)
File "/Developer/Marmalade/6.1/s3e/makefile_builder/mkb.py", line 32, in main
exit_code = mkb_main.run(argv)
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 3461, in run
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 3619, in run2
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 2697, in process_mkb_for_platform
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 690, in process
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 2602, in process_file
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 2124, in process
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 2124, in <lambda>
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 1971, in process
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 1130, in process_deployment_line
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/deployment.py", line 62, in SetOpt
NameError: global name 'output' is not defined
Press enter to continue...
I ve found this solution: https://devnet.madewithmarmalade.com/questions/2784/mkb-fails-to-build.html
but I don't think it's the best solution.
it's working for building the project but I got other problems when I have to deploy with the Marmalade deploy tool.
Sometimes deploy fails and the error in the error log is the same "global name 'output' is not defined"
I m not able to save my configuration in the .mkb, because if I do this, next time I reload the configuration, the deploy fails.
it was my fault, I had marmalade 6.1.1 installed instead of 6.1.2.
6.1.1 doensn't provide retina support and in the .mkb there was the tag "Enable 4-inch Retina Support" set.

Categories