Open JuanCab opened 2 years ago
The Workaround is to not use the Dimensions
node to tile and instead use the capacity to tile that is built in to ImageDisplay
(likely added after the 8 year old tutorials were developed).
This should be reopened, pull request #49 did NOT in fact fix this problem! I manually applied the pull request edits and get the following error:
Fri Jan 21 11:54:12 2022 - gpi.functor:380 - ERROR - PROCESS: 'Dimensions':'' compute() failed.
Traceback (most recent call last):
File "/Users/XXXXX/miniforge3/envs/gpi_env/lib/python3.7/site-packages/gpi/functor.py", line 378, in run
self._proxy.append(['retcode', self._func()])
File "/Users/XXXXX/miniforge3/envs/gpi_env/lib/python3.7/site-packages/gpi_core/shapers/GPI/Dimensions_GPI.py", line 616, in compute
out.shape = self.shape
TypeError: 'numpy.float64' object cannot be interpreted as an integer
When running through the YouTube Tutorial 1.3 video I discovered that the
Dimension
node in that video would trigger a crash when set to 'Tile' as a 4 column by 3 row set of images and then hitting compute. The error message wasA quick investigation showed that if the
initUI(self)
function in the class is run, then we get a crash. In certain situations when thisinitUI(self)
is not run (for example, removing the connection to theDimensions
node and reconnecting it only triggersvalidate(self)
andcompute(self)
), the function works as advertised. InInitUI(self)
we setself.shape = []
, which may be a problem in that an empty tuple is then used for the shape, which causes a problem when trying to reshape the array later.Interestingly running
InitUI(self)
followed byvalidate(self)
andcompute(self)
still triggers the problem even throughvalidate(self)
is supposed to set theself.shape
value. A little bit of poking around confirmed that the initialvalidate(self)
afterinitUI(self)
if we have op==8 ('Tile') set doesn't appear to actually initializeself.shape
. not sure where the initialization should take place in thevalidate(self)
function, but it is likely the bug fix needs to be there.