partio python binding

185 views
Skip to first unread message

michael vorberg

unread,
Jun 30, 2015, 12:37:44 PM6/30/15
to partio-...@googlegroups.com
hi everybody!

is there still someone looking at this list?

i want to play around with the partio python binding. i downloaded the latest binary version from redpawnfx and copied the python files into my python site packes folder. as soon as i try to "import partio" i get errors


Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "c:\Python27\lib\site-packages\partio.py", line 26, in <module>
    _partio = swig_import_helper()
  File "c:\Python27\lib\site-packages\partio.py", line 22, in swig_import

    _mod = imp.load_module('_partio', fp, pathname, description)
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.


(last line translates into "could not find the specific module")

so, which module is meant? the _partio.pyd is in the same location as the partio.py file. 


thanks,

michael

John Cassella

unread,
Jul 17, 2015, 4:42:59 PM7/17/15
to partio-...@googlegroups.com
Hi Michael,  yes, I'm still here, just been incredibly  busy lately with work.  But I am still actively  doing things with partio and  use it every day.

I'll have some compiles coming soon for  2015(finally)  and  2016  ASAP..

As for the python bindings.. I haven't had a ton of time to look at those recently, Its possible that The version you downloaded  (if you're not compiling it yourself?) was only compiled for  python 2.7 ?   not quite sure.. also you might need numpy  installed as well.  

what OS are you  doing this on?

-johnc
(redpawfx)

--
You received this message because you are subscribed to the Google Groups "partio-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to partio-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ilay

unread,
Oct 1, 2015, 2:06:50 AM10/1/15
to partio-discuss
Hello

Also tried to compile _partio by vs 2012 + py2.7, got errors

1>------ Build started: Project: _partio, Configuration: Release x64 ------
1>  Building Custom Rule e:/codes/source/partio-master/src/py/CMakeLists.txt
1>  CMake does not need to re-run because E:\codes\build\partio\src\py\CMakeFiles\generate.stamp is up-to-date.
1>  Swig source
1>e:\codes\source\partio-master\src\py\partio.i(550): warning 314: 'print' is a python keyword, renaming to '_print'
1>  Microsoft (R) C/C++ Optimizing Compiler Version 17.00.61030 for x64
1>  Copyright (C) Microsoft Corporation.  All rights reserved.
1> 
1>  cl /c /I"E:\codes\build\zlib-win_x64\include" /I"e:\codes\source\partio-master\src\lib" /IE:\codes\build\Python27\include /I"e:\codes\source\partio-master\src\py" /Ie:\codes\build\preSeExpr\include /W3 /WX- /O2 /Ob2 /D WIN32 /D _WINDOWS /D NDEBUG /D PARTIO_WIN32 /D _USE_MATH_DEFINES /D PARTIO_USE_ZLIB /D "CMAKE_INTDIR=\"Release\"" /D _partio_EXPORTS /D _WINDLL /D _MBCS /Gm- /EHsc /MD /GS /Zc:wchar_t /Zc:forScope /GR /Fo"_partio.dir\Release\\" /Fd"_partio.dir\Release\vc110.pdb" /Gd /TP /errorReport:prompt E:\codes\build\partio\py\partioPYTHON_wrap.cxx "e:\codes\source\partio-master\src\py\PartioSe.cpp"
1> 
1>  partioPYTHON_wrap.cxx
1>E:\codes\build\partio\py\partioPYTHON_wrap.cxx(3465): warning C4244: 'argument' : conversion from 'unsigned __int64' to 'long', possible loss of data
1>E:\codes\build\partio\py\partioPYTHON_wrap.cxx(3516): warning C4244: 'initializing' : conversion from 'Py_ssize_t' to 'int', possible loss of data
1>E:\codes\build\partio\py\partioPYTHON_wrap.cxx(3541): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>E:\codes\build\partio\py\partioPYTHON_wrap.cxx(3564): warning C4244: 'initializing' : conversion from 'Py_ssize_t' to 'int', possible loss of data
1>E:\codes\build\partio\py\partioPYTHON_wrap.cxx(3589): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>E:\codes\build\partio\py\partioPYTHON_wrap.cxx(4304): warning C4244: 'initializing' : conversion from 'Py_ssize_t' to 'int', possible loss of data
1>E:\codes\build\partio\py\partioPYTHON_wrap.cxx(4313): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>E:\codes\build\partio\py\partioPYTHON_wrap.cxx(4359): warning C4244: 'initializing' : conversion from 'Py_ssize_t' to 'int', possible loss of data
1>E:\codes\build\partio\py\partioPYTHON_wrap.cxx(4368): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>E:\codes\build\partio\py\partioPYTHON_wrap.cxx(4378): warning C4244: 'initializing' : conversion from 'Py_ssize_t' to 'int', possible loss of data
1>E:\codes\build\partio\py\partioPYTHON_wrap.cxx(4387): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>  PartioSe.cpp
1>e:\codes\source\partio-master\src\py\PartioSe.cpp(216): warning C4244: 'initializing' : conversion from 'float' to 'int', possible loss of data
1>e:\codes\source\partio-master\src\py\PartioSe.cpp(217): warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
1>e:\codes\source\partio-master\src\py\PartioSe.cpp(59): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>          e:\codes\source\partio-master\src\py\PartioSe.cpp(56) : while compiling class template member function 'void Partio::VarToPartio<T>::mapBack(void)'
1>          with
1>          [
1>              T=float
1>          ]
1>          e:\codes\source\partio-master\src\py\PartioSe.cpp(185) : see reference to function template instantiation 'void Partio::VarToPartio<T>::mapBack(void)' being compiled
1>          with
1>          [
1>              T=float
1>          ]
1>          e:\codes\source\partio-master\src\py\PartioSe.cpp(141) : see reference to class template instantiation 'Partio::VarToPartio<T>' being compiled
1>          with
1>          [
1>              T=float
1>          ]
1>e:\codes\source\partio-master\src\py\PartioSe.cpp(59): warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
1>          e:\codes\source\partio-master\src\py\PartioSe.cpp(56) : while compiling class template member function 'void Partio::VarToPartio<T>::mapBack(void)'
1>          with
1>          [
1>              T=int
1>          ]
1>          e:\codes\source\partio-master\src\py\PartioSe.cpp(182) : see reference to function template instantiation 'void Partio::VarToPartio<T>::mapBack(void)' being compiled
1>          with
1>          [
1>              T=int
1>          ]
1>          e:\codes\source\partio-master\src\py\PartioSe.cpp(143) : see reference to class template instantiation 'Partio::VarToPartio<T>' being compiled
1>          with
1>          [
1>              T=int
1>          ]
1>  Generating Code...
1>     Creating library E:/codes/build/partio/py/Release/_partio.lib and object E:/codes/build/partio/py/Release/_partio.exp
1>partio.lib(ParticleIO.obj) : error LNK2019: unresolved external symbol "class Partio::ParticlesDataMutable * __cdecl Partio::readPRT(char const *,bool,class std::basic_ostream<char,struct std::char_traits<char> > *)" (?readPRT@Partio@@YAPEAVParticlesDataMutable@1@PEBD_NPEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z) referenced in function "class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class Partio::ParticlesDataMutable * (__cdecl*)(char const *,bool,class std::basic_ostream<char,struct std::char_traits<char> > *),struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class Partio::ParticlesDataMutable * (__cdecl*)(char const *,bool,class std::basic_ostream<char,struct std::char_traits<char> > *)> > > & __cdecl Partio::readers(void)" (?readers@Partio@@YAAEAV?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@P6APEAVParticlesDataMutable@Partio@@PEBD_NPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@@ZU?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@P6APEAVParticlesDataMutable@Partio@@PEBD_NPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@@Z@std@@@2@@std@@XZ)
1>partio.lib(ParticleIO.obj) : error LNK2019: unresolved external symbol "bool __cdecl Partio::writePRT(char const *,class Partio::ParticlesData const &,bool,class std::basic_ostream<char,struct std::char_traits<char> > *)" (?writePRT@Partio@@YA_NPEBDAEBVParticlesData@1@_NPEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z) referenced in function "class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool (__cdecl*)(char const *,class Partio::ParticlesData const &,bool,class std::basic_ostream<char,struct std::char_traits<char> > *),struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,bool (__cdecl*)(char const *,class Partio::ParticlesData const &,bool,class std::basic_ostream<char,struct std::char_traits<char> > *)> > > & __cdecl Partio::writers(void)" (?writers@Partio@@YAAEAV?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@P6A_NPEBDAEBVParticlesData@Partio@@_NPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@@ZU?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@P6A_NPEBDAEBVParticlesData@Partio@@_NPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@@Z@std@@@2@@std@@XZ)
1>E:\codes\build\partio\py\Release\_partio.pyd : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Andrew Selle

unread,
Oct 1, 2015, 5:38:59 PM10/1/15
to partio-...@googlegroups.com
It looks like it is pissing the code for write and read PRT. Try commenting that out of the registration of thoese readers and writers from src/lib/io/ParticleIO.cpp... If that fixes it we can go from there. It may that the signatures are not matching for some reason in VS on those functions.

-A

Reply all
Reply to author
Forward
0 new messages