2012年3月17日土曜日

ElementTree.py not well-formed (invalid token)

Error:
rss = fromstring(r.xml) File "/base/python_runtime/python_dist/lib/python2.5/xml/etree/ElementTree.py", line 963, in XML parser.feed(text) File "/base/python_runtime/python_dist/lib/python2.5/xml/etree/ElementTree.py", line 1245, in feed self._parser.Parse(data, 0) ExpatError: not well-formed (invalid token): line 1, column 149
Fix
       r.xml = r.xml.replace("&type", "&type")

2012年3月8日木曜日

iOS5.1 purges SQLite file

iOS Data Storage Guidelines

addSkipBackupAttributeToItemAtURL
https://developer.apple.com/library/ios/#qa/qa1719/_index.html
  https://developer.apple.com/icloud/documentation/data/

 1. Apple が想定する iCloud のバックアップ対象は <application_home>/Document 以下のフォルダである。

  1.1. 従って、このエリアに一時ファイルを置いアプリは審査の際に reject される。

2. <application_home>/Library/Caches が一時エリア

  2.1  SQLite のファイルは <application_home>/Library/WebKit 以下に作成されていたが iOS5.1 からは <application_home>/Library/Cache に変更された。

  2.2  SQLite は Apple は恒久的なストレージとは考えていないので、バックアップの対象としない。

Examples of files you should put in the Caches directory include database cache files and downloadable content, http://groups.google.com/group/phonegap/browse_thread/thread/4490b6a80f6c0e7c?pli=1 
I hope I am wrong, but after installing iOS5.1 beta2, I see that the app data of my phonegap app are now stored in the Library/Cache folder : See this screenshot my app data in iExplorer :http://cl.ly/1p3L1U2W1J3y3I1T1r3y (before it was in Library/WebKit folder).  

3. Apple が指定しる一時エリアは <application_home>/tmp

4. Use the "do not back up" attribute for specifying files that should remain on device, even in low storage situations.

Apple は かまわないでよ!属性 を用意したけれども、これでいままで SQLite のストレージが置かれていた <application_home>/Library/WebKit を指定したとしても、もうすでにそのファイルはすべて iOS Update の際に purge されてしまっている。
<application_home>/Library/Caches 以下を かまわないでよ!属性 に指定できるかもしれないが、できたとしてもあまり信用しないほうがいい。
* 属性指定後、現在 2012年10月 までのところ削除されていない。

Use this attribute with data that can be recreated but needs to persist even in low storage situations for proper functioning of your app or because customers expect it to be available during offline use.

This attribute works on marked files regardless of what directory they are in, including the Documents directory.

These files will not be purged and will not be included in the user's iCloud or iTunes backup.

Because these files do use on-device storage space, your app is responsible for monitoring and purging these files periodically.

2012年3月5日月曜日

dev_appserver. 'module' object has no attribute 'HTTPSHandler'

Windows Server 2008 64bit版で   ActivePython 2.5 64bit だと Google AppEngine のlocal server が起動Errorとなった。 

C:\>dev_appserver.py xxxx
'module' object has no attribute 'HTTPSHandler'

ActivePython 2.5 32bit の場合

WARNING urlfetch_stub.py:111] No ssl package found. urlfetch will not be able to validate SSL certificates.

となるが起動できる



ちなみに

File "", line 1, in bind socket.error: (10013, 'Permission denied')


このエラーは port の問題なので port を 8080 以外のものに変更することで 対応。


Unityでドアの開閉はAnimatorそれともiTween?

Mac Mini M2 の Unity で Sketchup のデータを復元したつづき。 以前、苦労して作成したドアの開閉が動作しないので修復する。 どうやって動かしていたのか、また忘れそうなので記録しておく。             Animator 左右のドア PlaneL,...