9hg / micolog

Automatically exported from code.google.com/p/micolog
MIT License
0 stars 0 forks source link

model.py 中unicode问题 #16

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  ../google_appengine/dev_appserver.py --port=9999 micolog/
2.
3.

What is the expected output? What do you see instead?
Traceback (most recent call last):
  File "/home/a/google_appengine/google/appengine/tools/dev_appserver.py",
line 2725, in _HandleRequest
    base_env_dict=env_dict)
  File "/home/a/google_appengine/google/appengine/tools/dev_appserver.py",
line 381, in Dispatch
    base_env_dict=base_env_dict)
  File "/home/a/google_appengine/google/appengine/tools/dev_appserver.py",
line 2012, in Dispatch
    self._module_dict)
  File "/home/a/google_appengine/google/appengine/tools/dev_appserver.py",
line 1930, in ExecuteCGI
    reset_modules = exec_script(handler_path, cgi_path, hook)
  File "/home/a/google_appengine/google/appengine/tools/dev_appserver.py",
line 1826, in ExecuteOrImportScript
    exec module_code in script_module.__dict__
  File "/home/a/桌面/micolog/blog.py", line 19, in <module>
    from base import *
  File "/home/a/google_appengine/google/appengine/tools/dev_appserver.py",
line 996, in decorate
    return func(self, *args, **kwargs)
  File "/home/a/google_appengine/google/appengine/tools/dev_appserver.py",
line 1586, in load_module
    return self.FindAndLoadModule(submodule, fullname, search_path)
  File "/home/a/google_appengine/google/appengine/tools/dev_appserver.py",
line 996, in decorate
    return func(self, *args, **kwargs)
  File "/home/a/google_appengine/google/appengine/tools/dev_appserver.py",
line 1494, in FindAndLoadModule
    description)
  File "/home/a/google_appengine/google/appengine/tools/dev_appserver.py",
line 996, in decorate
    return func(self, *args, **kwargs)
  File "/home/a/google_appengine/google/appengine/tools/dev_appserver.py",
line 1444, in LoadModuleRestricted
    description)
  File "/home/a/桌面/micolog/base.py", line 17, in <module>
    from  model import *
  File "/home/a/google_appengine/google/appengine/tools/dev_appserver.py",
line 996, in decorate
    return func(self, *args, **kwargs)
  File "/home/a/google_appengine/google/appengine/tools/dev_appserver.py",
line 1586, in load_module
    return self.FindAndLoadModule(submodule, fullname, search_path)
  File "/home/a/google_appengine/google/appengine/tools/dev_appserver.py",
line 996, in decorate
    return func(self, *args, **kwargs)
  File "/home/a/google_appengine/google/appengine/tools/dev_appserver.py",
line 1494, in FindAndLoadModule
    description)
  File "/home/a/google_appengine/google/appengine/tools/dev_appserver.py",
line 996, in decorate
    return func(self, *args, **kwargs)
  File "/home/a/google_appengine/google/appengine/tools/dev_appserver.py",
line 1444, in LoadModuleRestricted
    description)
  File "/home/a/桌面/micolog/model.py", line 566, in <module>
    gblog_init()
  File "/home/a/桌面/micolog/model.py", line 560, in gblog_init
    g_blog.get_theme()
  File "/home/a/桌面/micolog/model.py", line 138, in get_theme
    self.theme= Theme(self.theme_name);
  File "/home/a/桌面/micolog/model.py", line 23, in __init__
    self.server_dir = os.path.join(rootpath, 'themes', self.name)
  File "/usr/lib/python2.5/posixpath.py", line 65, in join
    path += '/' + b

What version of the product are you using? On what operating system?
version 0.5

Please provide any additional information below.
恩,尝试了将 self.server_dir = os.path.join(rootpath, 'themes', self.name)
改成 self.server_dir = os.path.join(rootpath, u'themes', self.name)
不过没用。。。

谢谢

Original issue reported on code.google.com by ljy080829 on 22 Sep 2009 at 12:30

GoogleCodeExporter commented 8 years ago
恩,不过我把self.server_dir = os.path.join(rootpath, 'themes', 
self.name)中
的self.name删掉倒是可以。。。

Original comment by ljy080829 on 22 Sep 2009 at 12:39

GoogleCodeExporter commented 8 years ago

Original comment by coolch...@gmail.com on 1 Feb 2010 at 5:22

GoogleCodeExporter commented 8 years ago

Original comment by coolch...@gmail.com on 1 Feb 2010 at 5:23

GoogleCodeExporter commented 8 years ago

Original comment by coolch...@gmail.com on 1 Feb 2010 at 5:24