小编tae*_*moh的帖子

GAE SDK 1.7.4和InvalidCertificateException

最近,我将GAE SDK升级到了ver.1.7.4当我尝试运行开发服务器时,它开始抛出'InvalidCertificateException'.我搜索了这个错误,有些人说它随着时间的推移而消失,但我没有.我应该考虑什么来解决这个问题?我正在使用python框架Django为我的应用程序,如果这必须以某种方式.

$ dev_appserver.py ./
INFO     2012-12-16 07:44:31,412 appcfg.py:586] Checking for updates to the SDK.
Traceback (most recent call last):
  File "/usr/local/bin/dev_appserver.py", line 171, in <module>
    run_file(__file__, globals())
  File "/usr/local/bin/dev_appserver.py", line 167, in run_file
    execfile(script_path, globals_)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_main.py", line 747, in <module>
    sys.exit(main(sys.argv))
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_main.py", line 680, in main
    update_check.CheckForUpdates()
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 597, in CheckForUpdates
    runtime=self.config.runtime)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appengine_rpc.py", line 391, in Send
    f = self.opener.open(req)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 394, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 412, …
Run Code Online (Sandbox Code Playgroud)

python django google-app-engine

22
推荐指数
1
解决办法
6652
查看次数

Mac OSX Mountain Lion上的GCC-4.2错误,无法安装mysql-python

我在Mac OSX Mountain Lion上构建MySQLdb时遇到了麻烦.从OSX Lion升级到OSX Mountain Lion后,我也下载并安装了Xcode 4.4.然后,我转到Xcode的Preference> Downloads并安装了命令行工具.

我已经下载了MySQL-python ver.1.2.3来自http://sourceforge.net/projects/mysql-python/

我跑的时候

python setup.py build
Run Code Online (Sandbox Code Playgroud)

我得到以下消息:

running build
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.6-intel-2.7/MySQLdb
running build_ext
building '_mysql' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -O3 -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/local/mysql/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.6-intel-2.7/_mysql.o -Os -g -fno-common -fno-strict-aliasing -arch x86_64
unable to execute gcc-4.2: No such file or directory
error: command 'gcc-4.2' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)

但是,gcc存在.我跑的时候

gcc
Run Code Online (Sandbox Code Playgroud)

我明白了

i686-apple-darwin11-llvm-gcc-4.2: no input files
Run Code Online (Sandbox Code Playgroud)

下面是我发现的类似问题,但它的解决方案正是我已经做过的,对我来说不起作用.

如何在Mountain Lion上安装MySQLdb

gcc mysql-python osx-mountain-lion

9
推荐指数
1
解决办法
1万
查看次数

Django-Compressor实际存在时找不到文件

我刚刚将django-compressor安装到我的项目中,并且收到以下错误消息。

呈现时的TemplateSyntaxError /捕获到UncompressableFileError:在COMPRESS_ROOT'/ Users / taelimoh / Dropbox / gluwa-git / static'或静态文件中找不到'js / jquery-1.7.2.min.js'。

当我尝试压缩CSS文件时也会发生这种情况。

当然,文件在那里,当我不尝试使用django-compressor压缩它们时,它可以正常工作。

下面是我的模板

...
    {% compress js %}
        <!--Javascripts-->
        <!--Libraries-->
        <script type="text/javascript" src="/static/js/jquery-1.7.2.min.js"></script>
    {% endcompress %}
...
Run Code Online (Sandbox Code Playgroud)

这是我的settings.py

COMPRESS_ENABLED = True

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    'compressor.finders.CompressorFinder',
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.admin',
    'django.contrib.admindocs',
    'django.contrib.humanize',
    ##############################################
    'appconf',# required by django-compressor
    'versiontools',# required by django-compressor
    'compressor',#https://github.com/jezdez/django_compressor
    ...
)
Run Code Online (Sandbox Code Playgroud)

我正在使用Google App Engine,而我的Django版本是1.3。该问题是在我的开发服务器上产生的。

python django google-app-engine django-compressor

5
推荐指数
1
解决办法
1801
查看次数