avihaygit / sitemap-generators

Automatically exported from code.google.com/p/sitemap-generators
0 stars 0 forks source link

Sitemap Index File can not be written > 50000 Links - typo error in code #50

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. sitemap type = web
2. more then 50.000 Links, so at least two sitemaps are created like : 
sitemap.xml, sitemap1.xlm
3. run the script 

expected is to write the sitemap_index.xml correctly, but the script fails.
Traceback Information : 

The Sitemap type is WEB Sitemap.
<type 'instance'>
Walking DIRECTORY "/rotek/inetpub/pics.rotek.at/"
Sorting and normalizing collected URLs.
Writing Sitemap file "/rotek/inetpub/pics.rotek.at/sitemap.xml" with 50000 URLs
Sorting and normalizing collected URLs.
Writing Sitemap file "/rotek/inetpub/pics.rotek.at/sitemap1.xml" with 12037 URLs
Writing index file "/rotek/inetpub/pics.rotek.at/sitemap_index.xml" with 2 
Sitemaps
Traceback (most recent call last):
  File "/rotek/inetpub/SiteMapCreator/sitemap_gen.py", line 2092, in <module>
    sitemap.Generate()
  File "/rotek/inetpub/SiteMapCreator/sitemap_gen.py", line 1665, in Generate
    self.WriteIndex()
  File "/rotek/inetpub/SiteMapCreator/sitemap_gen.py", line 1810, in WriteIndex
    fd.write(sitemap_index_header)
UnboundLocalError: local variable 'sitemap_index_header' referenced before 
assignment

the error is caused by a typo in the code, procedure WriteIndex, Line 1802 :

Original Code : sitemap__index_header = GENERAL_SITEMAP_HEADER
Correct Code :  sitemap_index_header = GENERAL_SITEMAP_HEADER

please find attached the corrected sitemap_gen.py

Original issue reported on code.google.com by Rnowotny...@gmail.com on 20 Jul 2013 at 5:46

Attachments: