Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error writing sitemap_index file for WEB type sitemap #18

Open
GoogleCodeExporter opened this issue Apr 4, 2016 · 2 comments
Open

Error writing sitemap_index file for WEB type sitemap #18

GoogleCodeExporter opened this issue Apr 4, 2016 · 2 comments

Comments

@GoogleCodeExporter
Copy link

Version of script: 1.5
OS: windows xp

I tried to generate a sitemap using the urllist method. 
When the script writes the sitemap_index file the following error occurs:

The Sitemap type is WEB Sitemap.
...
Writing index file "C:\tools\sitemapGenerator\sitemap\sitemap_index.xml"
with 2 Sitemaps
Traceback (most recent call last):
  File "sitemap_gen.py", line 2092, in ?
    sitemap.Generate()
  File "sitemap_gen.py", line 1665, in Generate
    self.WriteIndex()
  File "sitemap_gen.py", line 1810, in WriteIndex
    fd.write(sitemap_index_header)
UnboundLocalError: local variable 'sitemap_index_header' referenced before
assignment

There's an extra underscore when referencing the sitemap_index_header
variable in the WriteIndex method, line 1802. The line reads

sitemap__index_header = GENERAL_SITEMAP_HEADER
versus
sitemap_index_header = GENERAL_SITEMAP_HEADER


Thanks,
Leah

Original issue reported on code.google.com by leah.pod...@gmail.com on 11 Apr 2008 at 8:24

@GoogleCodeExporter
Copy link
Author

I am having the same issue.

Original comment by advertis...@wholesalerscatalog.com on 17 Mar 2009 at 3:13

@GoogleCodeExporter
Copy link
Author

Here is small patch for this or you can go to line 1802
and change sitemap__index_header to sitemap_index_header (remove one underscore)

Original comment by strufkin on 15 May 2009 at 9:45

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant