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

'NoneType' object is not iterable in lighting.py #3

Open
larryhastings opened this issue Jan 16, 2018 · 1 comment
Open

'NoneType' object is not iterable in lighting.py #3

larryhastings opened this issue Jan 16, 2018 · 1 comment
Assignees

Comments

@larryhastings
Copy link
Owner

No description provided.

@larryhastings
Copy link
Owner Author

Backtrace and some info from pdb:

Traceback (most recent call last):
File "/home/larry/lib/python3.6/pdb.py", line 1667, in main
pdb._runscript(mainpyfile)
File "/home/larry/lib/python3.6/pdb.py", line 1548, in _runscript
self.run(statement)
File "/home/larry/lib/python3.6/bdb.py", line 431, in run
exec(cmd, globals, locals)
File "", line 1, in
File "/home/larry/src/pyweek24.directors.cut/run_game.py", line 1, in
import sys
File "/home/larry/src/pyweek24.directors.cut/src/main.py", line 3502, in
pyglet.app.run()
File "/home/larry/lib/python3.6/site-packages/pyglet/app/init.py", line 143, in run
event_loop.run()
File "/home/larry/lib/python3.6/site-packages/pyglet/app/base.py", line 136, in run
self._run_estimated()
File "/home/larry/lib/python3.6/site-packages/pyglet/app/base.py", line 165, in _run_estimated
timeout = self.idle()
File "/home/larry/lib/python3.6/site-packages/pyglet/app/base.py", line 280, in idle
window.dispatch_event('on_draw')
File "/home/larry/lib/python3.6/site-packages/pyglet/window/init.py", line 1154, in dispatch_event
if EventDispatcher.dispatch_event(self, *args) != False:
File "/home/larry/lib/python3.6/site-packages/pyglet/event.py", line 358, in dispatch_event
self._raise_dispatch_exception(event_type, args, handler)
File "/home/larry/lib/python3.6/site-packages/pyglet/event.py", line 355, in dispatch_event
if handler(*args):
File "/home/larry/src/pyweek24.directors.cut/src/main.py", line 3453, in on_draw
RobotSprite.draw_diffuse()
File "/home/larry/lib/python3.6/contextlib.py", line 88, in exit
next(self.gen)
File "/home/larry/src/pyweek24.directors.cut/src/lighting.py", line 135, in illuminate
self.render()
File "/home/larry/src/pyweek24.directors.cut/src/lighting.py", line 154, in render
lx, ly = light.position
TypeError: 'NoneType' object is not iterable

(Pdb) print(light.position)
None
(Pdb) print(light.color)
(1.0, 1.0, 1.0)
(Pdb) print(light.radius)
90
(Pdb) print(len(self.lights))
22
(Pdb)

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

No branches or pull requests

2 participants