We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a1a109 commit 8335451Copy full SHA for 8335451
examples/play_file.py
@@ -90,11 +90,8 @@ def process(frames):
90
client.outports.register('out_{0}'.format(ch + 1))
91
block_generator = f.blocks(blocksize=blocksize, dtype='float32',
92
always_2d=True, fill_value=0)
93
- try:
94
- for data in block_generator:
95
- q.put_nowait(data)
96
- except queue.Full:
97
- pass
+ for _, data in zip(range(args.buffersize), block_generator):
+ q.put_nowait(data) # Pre-fill queue
98
with client:
99
if not args.manual:
100
target_ports = client.get_ports(
@@ -117,4 +114,4 @@ def process(frames):
117
114
# A timeout occured, i.e. there was an error in the callback
118
115
parser.exit(1)
119
116
except Exception as e:
120
- parser.exit(e)
+ parser.exit(type(e).__name__ + ': ' + str(e))
0 commit comments