Skip to main content
Question

PythonCaller: cannot import pcl, receive Python Exception : numpy.ufunc has the wrong size, try recompiling"


jhodges
Contributor
Forum|alt.badge.img+3

After quite a lot of troubleshooting python packages, I have whittled the script in the PythonCaller down to simply importing some packages:

import fme
import fmeobjects
import pcl

class FeatureProcessor(object):
    def __init__(self):
        pass
        
    def input(self,feature):
        pass
        
    def close(self):
        pass

However, I still receive a Python Exception:

Python Exception <ValueError>: numpy.ufunc has the wrong size, try recompiling. Expected 192, got 216

which is being caused by importing pcl (python-pcl).

I AM, however, able to utilize this package directly in python using the same interpreter.  I only encounter this error from within FME.

I have found references to Cython throwing warnings (but not errors) due to a reference to an older numpy version (https://github.com/numpy/numpy/issues/12785#issuecomment-455336738), but it seems that issue has been addressed and I do not encounter any warnings when I run scripts directly.

At this point, I have to assume that the PythonCaller is at fault.  Does anyone out there have any other ideas?

 

I am using a custom python interpreter (I have tried both 3.7 & 3.6), which has had all of the applicable packages installed, on Windows 10 with FME Workbench 2019.0, build 19246.

 

 

2 replies

david_r
Celebrity
  • July 23, 2019

Could it somehow be due to a mix of 32- and 64-bit libraries?


jhodges
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • July 23, 2019
david_r wrote:

Could it somehow be due to a mix of 32- and 64-bit libraries?

I don't think so, simply because I can import numpy independently with the PythonCaller and get no errors. It seems to me that some dependency of PCL may have been compiled with a previous version of numpy and is throwing a warning that FME may be interpreting as an error. But that seems odd, too. I can import PCL just fine in external scripts, without any warnings; it only seems to be an issue when I use the PythonCaller in FME.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings