Bryan Schneiders wrote:
cobbler-1.6.4-1.fc10.i386 python-cheetah-2.0.1-2.fc9.i386
I upgraded to 1.6.4 and tried again. Same issue.
I also tried with #raw as suggested by Jeff and it still errors out. #raw # 0x2013, – # 0x2014, — # 0x2018, ‘ # 0x2019, ’ #end raw
I'm not sure why em dashes are there to begin with, though I do agree they should not break things. This may be a Cheetah bug on an older version of Python. Either way, this worked for me on F10 and hasn't been reported yet by anyone else, though if you're doing something like a HERE doc in a kickstart I can't say it's wrong to expect that to not choke.
As James Cammarata pointed out online, it seems you might be editing your kickstarts with something like MS Word? If so an easy fix is to not do that :)
It happens when I attempt to edit the kickstart from the web interface. Sorry if I wasn't clear on that originally.
https://%5Bremoved%5D/cobbler/web/?mode=ksfile_edit&name=/var/lib/cobble...
MOD_PYTHON ERROR
ProcessId: 24533 Interpreter: removed
ServerName: removed DocumentRoot: '/var/www/html'
URI: '/cobbler/web/' Location: None Directory: '/var/www/cobbler/web/' Filename: '/var/www/cobbler/web/' PathInfo: ''
Phase: 'PythonHandler' Handler: 'index'
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent)
File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1229, in _process_target result = _execute_target(config, req, object, arg)
File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1128, in _execute_target result = object(arg)
File "/var/www/cobbler/web/index.py", line 130, in handler content = func( **form )
File "/usr/lib/python2.5/site-packages/cobbler/webui/CobblerWeb.py", line 1170, in ksfile_edit 'ksdata': self.remote.read_or_write_kickstart_template(name,True,"",self.token)
File "/usr/lib/python2.5/site-packages/cobbler/webui/CobblerWeb.py", line 102, in __render return str(tmpl)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 3685: ordinal not in range(128)
MODULE CACHE DETAILS
Accessed: Tue May 19 11:46:45 2009 Generation: 0
_mp_43be29589f5d909275df7d4c30cbcdd3 { FileName: '/var/www/cobbler/web/index.py' Instance: 1 [IMPORT] Generation: 1 Modified: Fri May 8 11:36:31 2009 Imported: Tue May 19 11:46:45 2009 }
Bryan Schneiders bschneiders@woti.com 301-562-1900 ext 305
Michael DeHaan wrote:
Bryan Schneiders wrote:
When attempting to use a kickstart file from http://oss.tresys.com/projects/clip/wiki/DownloadRelease I get tracebacks because it contains fancier than necessary dash and quote characters in comments.
Specifically 0x2013, 0x2014, 0x2018 and 0x2019, or –, —, ‘ and ’ respectively. I can fix the kickstart file by replacing these with the standard - and ' characters and I have sent an email to the CLIP developers to inform them of the issue, but I wanted to alert the cobbler developers as well in case this incompatibility should be fixed on both ends.
Here's an example traceback using a kickstart file containing only these 4 lines: # 0x2013, – # 0x2014, — # 0x2018, ‘ # 0x2019, ’
Interesting.
What versions of cobbler and python-cheetah are you using?
I remember making some unicode fixes recently to 1.6.4 that should have fixed this. Just trying with devel HEAD, I can do the following successfully using a template pasted from the above.
[mdehaan@mdehaan cobbler]$ sudo cobbler profile edit --name=F10-i386 --kickstart=/tmp/test.ks [mdehaan@mdehaan cobbler]$ sudo cobbler profile getks --name=F10-i386 # 0x2013, – # 0x2014, — # 0x2018, ‘ # 0x2019, ’
MOD_PYTHON ERROR
ProcessId: 25129 Interpreter: removed
ServerName: removed DocumentRoot: '/var/www/html'
URI: '/cobbler/web/' Location: None Directory: '/var/www/cobbler/web/' Filename: '/var/www/cobbler/web/' PathInfo: ''
Phase: 'PythonHandler' Handler: 'index'
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent)
File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1229, in _process_target result = _execute_target(config, req, object, arg)
File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1128, in _execute_target result = object(arg)
File "/var/www/cobbler/web/index.py", line 130, in handler content = func( **form )
File "/usr/lib/python2.5/site-packages/cobbler/webui/CobblerWeb.py", line 1171, in ksfile_edit 'ksdata': self.remote.read_or_write_kickstart_template(name,True,"",self.token)
File "/usr/lib/python2.5/site-packages/cobbler/webui/CobblerWeb.py", line 102, in __render return str(tmpl)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 3681: ordinal not in range(128)
MODULE CACHE DETAILS
Accessed: Tue May 19 10:23:54 2009 Generation: 1
_mp_43be29589f5d909275df7d4c30cbcdd3 { FileName: '/var/www/cobbler/web/index.py' Instance: 1 Generation: 1 Modified: Fri Mar 27 15:41:21 2009 Imported: Tue May 19 09:55:15 2009 }
cobbler-devel mailing list cobbler-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler-devel
cobbler-devel mailing list cobbler-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler-devel