|
Boost Users : |
Subject: [Boost-users] [Python]
From: Oliver Rudolph (oliver.rudolph_at_[hidden])
Date: 2010-02-15 06:18:56
Hi folks!
When trying to run Python-wrapped C++ code, I receive the following
message (this was a simple call to one of the c'tors of class TextFile):
Traceback (most recent call last):
File "./FileTest.py", line 5, in <module>
t_out = TextFile("sample.txt", "This is some sample text. It
says:\n\nHello world!")
Boost.Python.ArgumentError: Python argument types in
TextFile.__init__(TextFile, str, str)
did not match C++ signature:
__init__(_object*, std::string filename, dretchy::io::DeviceDataType
type, std::string content, dretchy::io::CompressionType zipper)
__init__(_object*, std::string filename, dretchy::io::DeviceDataType
type, dretchy::io::CompressionType zipper)
__init__(_object*, std::string filename, dretchy::io::DeviceDataType
type, std::string content)
__init__(_object*, std::string filename, dretchy::io::DeviceDataType
type)
__init__(_object*, std::string filename, std::string content,
dretchy::io::CompressionType zipper)
__init__(_object*, std::string filename,
dretchy::io::CompressionType zipper)
__init__(_object*, std::string filename, std::string content)
__init__(_object*, std::string filename)
Strangely enough, this only happens when doing so on my openSuSE 11.0
machine. If I try the same thing on my Ubuntu 9.10 notebook, it works
perfectly. What could be the source of this problem?
The code is a bit lengthy, so I attached the non-compilable headers only.
Personally, I presume the error is rooted in the C-string / C++
std::string conversion. The Python wrapping itself was done via Py++,
the boost libs in use are of version 1.41.0.
Thanks a lot and
best regards,
Oliver
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net