Forum Moderators: Robert Charlton & goodroi
sitemap_gen.py
config.xml
3. I'm trying to execute the script:
I try to do this setting up a cron job in my Cpanel Cron Jobs.
I did that but I get error.
On my cron output I get:
Reading configuration file: /home/directo1/public_html/config.xml
Walking DIRECTORY "/home/directo1/public_html/"
Traceback (most recent call last):
File "/home/directo1/public_html/sitemap_gen.py", line 1201, in?
sitemap.Generate()
File "/home/directo1/public_html/sitemap_gen.py", line 832, in Generate
input.ProduceURLs(self.ConsumeURL)
File "/home/directo1/public_html/sitemap_gen.py", line 585, in ProduceURLs
os.path.walk(self._path, PerFile, None)
File "/usr/lib/python2.3/posixpath.py", line 290, in walk
walk(name, func, arg)
File "/usr/lib/python2.3/posixpath.py", line 290, in walk
walk(name, func, arg)
File "/usr/lib/python2.3/posixpath.py", line 290, in walk
walk(name, func, arg)
File "/usr/lib/python2.3/posixpath.py", line 282, in walk
func(arg, top, names)
File "/home/directo1/public_html/sitemap_gen.py", line 564, in PerFile
path = os.path.join(dirpath, name)
File "/usr/lib/python2.3/posixpath.py", line 65, in join
path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0x97 in position 87: ordinal not
in range(128)
I tryed all sugestions:
encoding="utf-8"
encoding="ascii"
encoding="iso-8859-1"
And the same.
If somebody can help me I really apreciate that.
Thanks