RenderMan icon indicating copy to clipboard operation
RenderMan copied to clipboard

__init__() should return None, not 'NoneType' when instantiating RenderEngine()

Open alejandrok opened this issue 5 years ago • 3 comments

Spent an entire day trying to get renderman to work. Can't figure out what's wrong. Compiled the build for MacOS, renamed the librenderman.so.dylib to .so, tried with different python envs and I get the same issue over and over. Found on some threads that it could be related to having the wrong linking to the boost lib but when inspecting it is pointing to the right one. Any ideas?

`Alejandros-MacBook-Pro:lib alek$ /usr/local/bin/python Python 2.7.16 (default, Jun 19 2019, 07:40:37) [GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.46.4)] on darwin Type "help", "copyright", "credits" or "license" for more information.

import librenderman as rm JUCE v5.2.0 rm.RenderEngine(22050,256,256) Traceback (most recent call last): File "", line 1, in TypeError: init() should return None, not 'NoneType'`

alejandrok avatar Jun 26 '19 01:06 alejandrok

Same here. It's so hard to figure it out. Hoping for a clear solution on the issue.

czfandyslash avatar Jun 15 '20 01:06 czfandyslash

I fixed this by changing the link flags in the build settings.

Go to build settings in Xcode and change -lpython2.7m to -undefined dynamic_lookup in 'Other Linker Flags'

Refer to here: https://stackoverflow.com/questions/61463744/boost-python-typeerror-init-should-return-none-not-nonetype-but-no-ob

cyrusvahidi avatar Aug 05 '20 11:08 cyrusvahidi

I fixed this by changing the link flags in the build settings.

Go to build settings in Xcode and change -lpython2.7m to -undefined dynamic_lookup in 'Other Linker Flags'

Refer to here: https://stackoverflow.com/questions/61463744/boost-python-typeerror-init-should-return-none-not-nonetype-but-no-ob

Vcyrus, Thank you so much! The issue fixed and works fine!

czfandyslash avatar Aug 06 '20 09:08 czfandyslash