Blogs
Submitted by Neil Rubens on Fri, 07/03/2009 - 13:45
Problem
Description Resource Path Location Type
The App Engine SDK 'App Engine' on the project's build path is not valid. Mail Unknown Google App Engine Problem
SDK directory '/Applications/eclipse/plugins/...334/appengine-java-sdk-1.2.0' does not exist
SolutionReinstall GWT and GAE in Eclipse (by uninstalling them, and then installing; and don't forget to restart eclipse each time) Then go to the project properts and configure google SDK's once again To create eclipse project make sure to run from the samples applications before you try to import it into eclipse
../../webAppCreator -ignore com.google.gwt.sample.mail.Mail
Submitted by Neil Rubens on Tue, 06/16/2009 - 12:28
Problem
/appengine/ext/db/__init__.py, line 217, in class_for_kind raise KindError('No implementation for kind
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/admin/__init__.py", line 205, in post
exec(compiled_code, globals())
File "<string>", line 5, in <module>
File "/Users/neil/Documents/workspace/helloworld/src/data/citeseerx/LinkAnalyzer.py", line 31, in traverse
nodes = self.getLinkedNodes(node)
File "/Users/neil/Documents/workspace/helloworld/src/data/citeseerx/LinkAnalyzer.py", line 45, in getLinkedNodes
query = db.GqlQuery("SELECT * FROM Record WHERE relation_id_list = :1", node)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/db/__init__.py", line 1776, in __init__
model_class = class_for_kind(self._proto_query._entity)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/db/__init__.py", line 217, in class_for_kind
raise KindError('No implementation for kind \'%s\'' % kind)
KindError: No implementation for kind 'Record'
SolutionMake sure to import the class for the db class; e.g.:
from data.citeseerx.Record import *
query = db.GqlQuery("SELECT * FROM Record")
Submitted by Neil Rubens on Thu, 06/11/2009 - 13:45
ProblemWhen running
from google.appengine.ext import db
from data.citeseerx import Record
query = db.Query(Record)
#query.filter('identifier =', 'oai:CiteSeerXPSU:10.1.1.1.1494')
query.filter('ID =', '5')
#results = query.fetch()
print "hi"
The following error occurs
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/admin/__init__.py", line 205, in post
exec(compiled_code, globals())
File "<string>", line 6, in <module>
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/db/__init__.py", line 1667, in filter
if prop in self._model_class._unindexed_properties:
AttributeError: 'module' object has no attribute '_unindexed_properties'
ReasonThe field is not indexed in db Or to be more precise for some reason is not read through Query interface; how it is being read through GQL interface SolutionAdd needed index -- does not work Run query through GQL interface; e.g.:
from google.appengine.ext import db
from data.citeseerx import Record
#"""
#query = db.GqlQuery("SELECT * FROM Record " + "WHERE identifier = :1", "oai:CiteSeerXPSU:10.1.1.1.1494")
query = db.GqlQuery("SELECT * FROM Record " + "WHERE creator_id_list = :1", "Gokul Varadhan")
#"""
"""
query = db.Query(Record)
query.filter("identifier =", "oai:CiteSeerXPSU:10.1.1.1.1494")
#query.filter('ID =', '5')
"""
results = query.fetch(5)
for r in results:
print r
print "fin"
Submitted by Neil Rubens on Thu, 06/11/2009 - 11:27
Problem
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/admin/__init__.py", line 205, in post
exec(compiled_code, globals())
File "<string>", line 29, in <module>
File "/Users/neil/Documents/workspace/helloworld/src/data/citeseerx/FileSlicer.py", line 33, in slice
with open(file) as f:
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1022, in __init__
raise IOError(errno.EACCES, 'file not accessible', filename)
IOError: [Errno 13] file not accessible: '/Users/neil/Desktop/citeseerx_alldata.xml'
ReasonGAE for some reason does not like to read from some of the directories. Launchining sudo dev_appserver.py ; or changing permissions does not solve it. SolutionMove the data file to the src directory
Submitted by Neil Rubens on Wed, 06/10/2009 - 10:39
ProblemOccurs when running some code through the "interactive console" of google app engine
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/admin/__init__.py", line 204, in post
compiled_code = compile(code, '<string>', 'exec')
File "<string>", line 40
^
SyntaxError: invalid syntax SolutionDelete the blank line
Submitted by Neil Rubens on Wed, 06/10/2009 - 09:21
New: you can reserve your iPhone 3GS from softbank here (pricing details) Looks like the iPhone 3G S (aka 3GS) will be sold in Japan starting from Jun.26th The pricing is similar to the 16GB 3G model as shown in a machine translated paragraph bellow (original).   As for iPhone 3G S, the iPhone for everybody campaign is applied. Details of iPhone 3G S are here. Details of the iPhone for everybody campaign and the price plan are here. Price of main body(amount of substance load) | Campaign application price | Campaign non-application price | iPhone 3G S 16GB | 480 yen/month(11,520 yen) | 960 yen/month(23,040 yen) | iPhone 3G S 32GB | 960 yen/month(23,040 yen) | 1,440 yen/month(34,560 yen) | - - The price of the main body is customer's substantial obligation fees (16GB in case of the application of the difference campaign of "Crack every month" discounted from division money and the communication charge every month: the division money 2400 yen, the crack 1920 yen of every month, and 32GB: division money 2880 yen and crack 1920 yen of every month) when buying it by a new contract and a new super-bonus (24 time installments) in the Softbank shop (direct-management shop).
- - It is necessary to apply at the same time as buying iPhone 3G S when it joins the application of the iPhone for everybody campaign by new or the model change.
- - Campaign..application..white..plan..contract..promise..contract..campaign..joining..need.Contract..campaign..update..month..offer..provide..automatic renewal..become.
- The logo of Apple and Apple is registered trademarks of the Apple Inc.of the United States and another country. IPhone is a trademark of the Apple Inc..
- The iPhone trademark is used based on the license of Aiphone Co., Ltd..
- IPhone 3G might be set for you to be able to use it only because of the service of a single telecommunications house.
For using IPhone Packet Flat Rate Full discount enabled usims
(black in color)
APN: smile.world
Username: dna1trop
Password: so2t3k3m2a
http://forum.xda-developers.com/showthread.php?t=441400&page=6
Submitted by Neil Rubens on Mon, 06/08/2009 - 18:05
ProblemCould not deploy google app engine application
neils-mac-pro:helloworld neil$ appcfg.py update src/
/usr/local/bin/appcfg.py:40: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
DIR_PATH,
Scanning files on local disk.
Initiating update.
2009-06-08 18:02:15,639 ERROR appcfg.py:1241 An unexpected error occurred. Aborting.
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 1219, in DoUpload
missing_files = self.Begin()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 1014, in Begin
version=self.version, payload=self.config.ToYAML())
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appengine_rpc.py", line 344, in Send
f = self.opener.open(req)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 383, in open
response = self._open(req, data)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 401, in _open
'_open', req)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 361, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 1130, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 1105, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 61] Connection refused>
Traceback (most recent call last):
File "/usr/local/bin/appcfg.py", line 60, in <module>
run_file(__file__, globals())
File "/usr/local/bin/appcfg.py", line 57, in run_file
execfile(script_path, globals_)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 2215, in <module>
main(sys.argv)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 2206, in main
result = AppCfgApp(argv).Run()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 1424, in Run
self.action(self)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 2102, in __call__
return method()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 1679, in Update
lambda path: open(os.path.join(basepath, path), "rb"))
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 1219, in DoUpload
missing_files = self.Begin()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 1014, in Begin
version=self.version, payload=self.config.ToYAML())
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appengine_rpc.py", line 344, in Send
f = self.opener.open(req)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 383, in open
response = self._open(req, data)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 401, in _open
'_open', req)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 361, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 1130, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 1105, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 61] Connection refused>
ReasonIn my case it was caused by proxy not allowing the connection SolutionSet up the proxy as to allow the desired network connection
Problem w/ above solution Unfortunately google app engine does not quite work through proxy in my case (I think my proxy is rather restrictive)
neils-mac-pro:helloworld neil$ appcfg.py update src//usr/local/bin/appcfg.py:40: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
DIR_PATH,
Scanning files on local disk.
Initiating update.
Email: xxxx@xxx.xxx
Password for xxxx@xxx.xxx:
2009-06-09 22:35:22,978 ERROR appcfg.py:1241 An unexpected error occurred. Aborting.
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 1219, in DoUpload
missing_files = self.Begin()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 1014, in Begin
version=self.version, payload=self.config.ToYAML())
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appengine_rpc.py", line 356, in Send
self._Authenticate()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appengine_rpc.py", line 391, in _Authenticate
super(HttpRpcServer, self)._Authenticate()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appengine_rpc.py", line 271, in _Authenticate
auth_token = self._GetAuthToken(credentials[0], credentials[1])
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appengine_rpc.py", line 214, in _GetAuthToken
response = self.opener.open(req)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 383, in open
response = self._open(req, data)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 401, in _open
'_open', req)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 361, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 1138, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 1105, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 1] _ssl.c:480: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol>
Traceback (most recent call last):
File "/usr/local/bin/appcfg.py", line 60, in <module>
run_file(__file__, globals())
File "/usr/local/bin/appcfg.py", line 57, in run_file
execfile(script_path, globals_)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 2215, in <module>
main(sys.argv)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 2206, in main
result = AppCfgApp(argv).Run()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 1424, in Run
self.action(self)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 2102, in __call__
return method()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 1679, in Update
lambda path: open(os.path.join(basepath, path), "rb"))
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 1219, in DoUpload
missing_files = self.Begin()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 1014, in Begin
version=self.version, payload=self.config.ToYAML())
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appengine_rpc.py", line 356, in Send
self._Authenticate()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appengine_rpc.py", line 391, in _Authenticate
super(HttpRpcServer, self)._Authenticate()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appengine_rpc.py", line 271, in _Authenticate
auth_token = self._GetAuthToken(credentials[0], credentials[1])
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appengine_rpc.py", line 214, in _GetAuthToken
response = self.opener.open(req)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 383, in open
response = self._open(req, data)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 401, in _open
'_open', req)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 361, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 1138, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 1105, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 1] _ssl.c:480: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol>
This problem has also been pointed out on this post I have corporate proxy that supports https but not HTTP CONNECT (even after authentication). It just gives 403 Forbidden in response anything but HTTP or HTTPS URLS. It uses HTTP authenication, not NTLM. It is well documented the urllib2 does not work with https thru a proxy. App Engine trys to connect to a https URL using urllib2 to update the app. On *nix, urllib2 expects proxies to set using env variables. export http_proxy="http://mycorporateproxy:8080" export https_proxy="https://mycorporateproxy:8080"
This is sited as a work around: http://code.activestate.com/recipes/456195/. Also see http://code.google.com/p/googleappengine/issues/detail?id=126. None of these fixes have worked for me. They seem to rely on the proxy server supporting HTTP CONNECT. Does anyone have any other work arounds? I sure I am not the only one behind a restrictive corporate proxy.
Submitted by Neil Rubens on Tue, 06/02/2009 - 20:48
Problem
xml.sax._exceptions.SAXParseException: /Users/neil/Documents/workspace/helloworld/src/data/citeseerx/t2.txt:205:0: junk after document element
Traceback (most recent call last):
File "/Users/neil/Documents/workspace/helloworld/src/data/citeseerx/CiteseerContentHandler.py", line 163, in <module>
parser.parse(open('/Users/neil/Documents/workspace/helloworld/src/data/citeseerx/t2.txt'))
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/sax/expatreader.py", line 107, in parse
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/sax/xmlreader.py", line 123, in parse
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/sax/expatreader.py", line 211, in feed
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/sax/handler.py", line 38, in fatalError
ReasonIn my case it is caused by multiple xml documents combined in one file, e.g.:
<?xml version="1.0" encoding="UTF-8"?>
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
<responseDate>2009-05-01T12:07:02+00:00</responseDate>
<request metadataPrefix="oai_dc" verb="ListRecords">http://citeseerx.ist.psu.edu/oai2</request>
<ListRecords>
...
...
...
<?xml version="1.0" encoding="UTF-8"?>
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
<responseDate>2009-05-01T12:07:02+00:00</responseDate>
<request metadataPrefix="oai_dc" verb="ListRecords">http://citeseerx.ist.psu.edu/oai2</request>
<ListRecords>
SolutionDefine your own error handler
class ErrorHandler:
def __init__(self, parser):
self.parser = parser
def fatalError(self, msg):
print msg
# add you handling here
And then pass it to the parser e.g.
errorHandler = ErrorHandler(parser)
parser.setErrorHandler(errorHandler)
parser.parse("t2.txt")
Submitted by Neil Rubens on Fri, 05/29/2009 - 13:50
ConditionTrying to set up git on assembla and push the repository there by following this instructions. Note there is an error on the page (at least in my case) git-commit should be "git commit" ProblemAt this step Following problem occurs:
git@git.assembla.com's password:
Permission denied, please try again.
None of the passwords work, etc. SolutionThis problem seems to be caused by ssh expecting the key in the file named id_rsa Follow the instructions at http://github.com/guides/providing-your-ssh-key When prompted for a file-name just press enter without entering the file-name (will default to id_rsa) To test wheter it works or not execute (as suggested by this post):
ssh -v git@git.assembla.com
Should see:
debug1: Authentication succeeded (publickey).
Now executing this should work:
Submitted by Neil Rubens on Thu, 05/28/2009 - 20:01
Problem: google app engine UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 4: ordinal not in range(128) Conditions: Occurs when trying to see the data; e.g. through http://localhost:8080/_ah/admin/datastore Reason: Seems to be caused by incorect handling of utf-8 Solution (partially mention in this post): Paste and execute the following in the interactive console: http://localhost:8080/_ah/admin/interactive
import sys
reload(sys); sys.setdefaultencoding('utf-8')
|