You need to log in to create posts and topics.

Pure Python 3 - queue error

I tried this "pure python" technique, so I tried both on Python 2 and Python 3. Apparently with Python 2, it is indeed working. But with Python 3, it is keep on failing.

from FoxDot import *

p1 >> pluck([1,2,3]) gives me error


~/FoxDot python3

Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 00:54:21)

[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>> from FoxDot import *

>>> p1 >> pluck([1,3,4])

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "/Users/jimmygunawan/FoxDot/FoxDot/lib/Players.py", line 357, in __rshift__

    self.update(other.name, other.degree, **other.kwargs)

  File "/Users/jimmygunawan/FoxDot/FoxDot/lib/Players.py", line 813, in update

    self.metro.schedule(self, self.event_index)

  File "/Users/jimmygunawan/FoxDot/FoxDot/lib/TempoClock.py", line 343, in schedule

    self.queue.add(obj, beat, args, kwargs)

  File "/Users/jimmygunawan/FoxDot/FoxDot/lib/TempoClock.py", line 444, in add

    if beat < next(self):

TypeError: 'Queue' object is not an iterator

Exception in thread Thread-1:

Traceback (most recent call last):

  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/threading.py", line 920, in _bootstrap_inner


  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/threading.py", line 868, in run

    self._target(*self._args, **self._kwargs)

  File "/Users/jimmygunawan/FoxDot/FoxDot/lib/TempoClock.py", line 282, in run

    next_event = next(self.queue)

TypeError: 'Queue' object is not an iterator

I tried a few times and apparently if I install FoxDot using: pip install FoxDot, it works (Python 3).

Previously, I was using python setup.py install.

Very strange! Do you know what version of FoxDot you installed using setup.py?