Hi

I'm currently developing a django project and i've encountered a
problem regarding Unicode string manipulation.

There is a backend python module in my project that perform's mainly
shutil (shell utilities) tasks.

I get an TypeError: "decoding Unicode is not supported" exception
while running the following method

---------------------------------------------------------------------------------------------------------
def create_base(name, reg):
    path = unicode(ROOT + name, 'utf-8') <<<< error at this line
    shutil.copytree(ROOT + 'matrix', path)
    shutil.copystat(ROOT + 'matrix', path)

    f = codecs.open(path + '/conf/local.php', "w", "UTF-8")
    tmp = unicode("<?php\n$conf['title'] = " + name + ";\n", 'utf-8')
    f.write(tmp)
    if not reg:
        f.write("$conf['disableactions'] = 'register';\n")
-------------------------------------------------------------------------------------------------------

The weird thing that puzzles me is that when i test the module in a
python shell , the method runs flawlessly which yields me to the
assumption that it's a django thing.
By the way i use apache+mod-python as a web-server

I can't get adequate information regarding this type of exception. I'm
stuck , please help.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to