Issue 121 in los-cocos: AssertionError: Backslashes not permitted in relative path

8 views
Skip to first unread message

codesite...@google.com

unread,
May 29, 2009, 4:41:27 AM5/29/09
to cocos-...@googlegroups.com
Status: New
Owner: ----

New issue 121 by jackmil7: AssertionError: Backslashes not permitted in
relative path
http://code.google.com/p/los-cocos/issues/detail?id=121

Running cocos2D samples on Windows raise this error:

File "hello_world.py", line 11, in <module>
import cocos
File "..\cocos\__init__.py", line 64, in <module>
pyglet.resource.reindex()
File "C:\PythonPackages\pyglet\pyglet\resource.py", line 327, in reindex
'Backslashes not permitted in relative path'
AssertionError: Backslashes not permitted in relative path


What version of the product are you using? On what operating system?
Windows 2000, cocos2D 0.3.0

Solution:
Instead of
pyglet.resource.path.append(os.path.join(os.path.dirname(__file__),
"resources"))

must be
pyglet.resource.path.append(os.path.join(os.path.dirname(__file__),
"resources").replace('\\', '/'))

Adding .replace('\\', '/') works for Mac OS X, Linux and Windows.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

Reply all
Reply to author
Forward
0 new messages