Open Tointoin opened 4 years ago
diff --git a/timeside/core/preprocessors.py b/timeside/core/preprocessors.py
index d16ceeaa..8a84f3e2 100644
--- a/timeside/core/preprocessors.py
+++ b/timeside/core/preprocessors.py
@@ -151,19 +151,19 @@ def frames_adapter(process_func):
if eod:
# Final zeropadding
pad_shape = tuple(
- self.blocksize - last_block_size if i == 0 else x
+ int(self.blocksize - last_block_size) if i == 0 else x
for i, x in enumerate(frames.shape))
stack = np.concatenate([stack, np.zeros(pad_shape,
dtype=frames.dtype)])
nb_frames += 1
- self.buffer = stack[nb_frames * self.stepsize:]
+ self.buffer = stack[int(nb_frames * self.stepsize):]
eod_list = np.repeat(False, nb_frames)
if eod and len(eod_list):
eod_list[-1] = eod
- for index, eod in zip(range(0, nb_frames * self.stepsize, self.stepsize), eod_list):
+ for index, eod in zip(range(0, int(nb_frames * self.stepsize), int(self.stepsize)), eod_list):
yield (stack[index:index + self.blocksize], eod)
aubio_analyzers = ['aubio_melenergy', 'aubio_mfcc', 'aubio_pitch', 'aubio_specdesc', 'aubio_temporal']
After applying this diff to the concerned preprocessor.py
file, the given traceback is:
[2020-03-09 17:04:03,034: ERROR/ForkPoolWorker-4] Task timeside.server.tasks.experience_run[69ee447f-8c77-4e59-8cfa-cc3687a92403] raised unexpected: TypeError("string argument expected, got 'bytes'")
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/celery/app/trace.py", line 385, in trace_task
R = retval = fun(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/celery/app/trace.py", line 650, in __protected_call__
return self.run(*args, **kwargs)
File "/srv/lib/timeside/timeside/server/tasks.py", line 39, in experience_run
item.run(experience)
File "/srv/lib/timeside/timeside/server/models.py", line 523, in run
pipe.run()
File "/srv/lib/timeside/timeside/core/processor.py", line 562, in run
item.post_process()
File "/srv/lib/timeside/timeside/core/grapher.py", line 354, in post_process
self.image_height), self.dpi)
File "/srv/lib/timeside/timeside/core/analyzer.py", line 696, in _render_PIL
canvas.print_png(imgdata, dpi=dpi)
File "/usr/local/lib/python3.7/dist-packages/matplotlib/backends/backend_agg.py", line 532, in print_png
self.figure.dpi, metadata=metadata)
TypeError: string argument expected, got 'bytes'
empty results for encoders are created with draft status. No other experience are created.
same result.
While applying the experience
all
on the selectionTests
, empty results for encoders are created with draft status. No other experience are created. Worker's logs give this error:It seems to be the case since use of AubioDecoder. This error does not occure while applying all encoders at the same time on
Tests
selection (or all analyzers on the same selection). This occures only withall
experience.