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

win: TypeError: 'NoneType' object is not iterable #1

Open
samtaufa opened this issue May 20, 2009 · 2 comments
Open

win: TypeError: 'NoneType' object is not iterable #1

samtaufa opened this issue May 20, 2009 · 2 comments
Labels

Comments

@samtaufa
Copy link
Collaborator

Run countershape over a doc-src tree and it will return the above error.

More Information

The code parses the page, but fails at the end of the page processing (whatever it is doing at the time.)

$ cshape doc-src/ /c/tmp/output/
Traceback (most recent call last):
File "./cshape", line 50, in
main()
File "./cshape", line 46, in main
c.main()
File "./cshape", line 34, in main
d.render(args[1])
File "d:\repos\src\countershape\countershape\doc.py", line 291, in render
out = self(i)
File "d:\repos\src\countershape\countershape\doc.py", line 296, in call
return list(model.BaseApplication.call(self, page))[0]
File "d:\repos\src\countershape\countershape\model.py", line 460, in call
for d in page():
File "d:\repos\src\countershape\countershape\model.py", line 299, in call
yield unicode(layout(self))
File "d:\repos\src\countershape\countershape\html.py", line 50, in str
return "".join([unicode(i) for i in self.children])
File "d:\repos\src\countershape\countershape\html.py", line 143, in str
"".join([unicode(i) for i in self.children]),
File "d:\repos\src\countershape\countershape\html.py", line 143, in str
"".join([unicode(i) for i in self.children]),
File "d:\repos\src\countershape\countershape\template.py", line 129, in **str_
_
s = self.block.render(**kwargs)
File "c:\Python26\lib\site-packages\cubictemp.py", line 154, in render
r = "".join([i.render(n) for i in self])
File "c:\Python26\lib\site-packages\cubictemp.py", line 139, in render
return str(ret)
File "d:\repos\src\countershape\countershape\widgets.py", line 113, in __str

self._mkUL(nodes, exclude, self.depth),

File "d:\repos\src\countershape\countershape\widgets.py", line 75, in _mkUL
for p in n:
TypeError: 'NoneType' object is not iterable

@samtaufa
Copy link
Collaborator Author

Platform: Windows 7 RC1

@samtaufa
Copy link
Collaborator Author

samtaufa commented May 6, 2010

Work-around:

I don't understand the full code, but found the following work-around for Windows users.

Instead of passing a path "/filename" to countershape.widgets.SiblingPageIndex, using the windows notation for passing file paths in a string (i.e. "\filename"") <-- that's 2 x backslashes.)

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

No branches or pull requests

1 participant