Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8713887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:27:28+00:00 2026-06-13T05:27:28+00:00

I have several modules which define converters for some trivial types (such as list

  • 0

I have several modules which define converters for some trivial types (such as list of ints as std::vector<int>); they are parts of independent modules, but they are sometimes both used in one script, which leads to

RuntimeWarning: to-Python converter for std::vector<int, std::allocator<int> > already registered; second conversion method ignored.

How can I check that converter for some type is already define and skip the second registration?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:27:30+00:00Added an answer on June 13, 2026 at 5:27 am
    boost::python::type_info info = boost::python::type_id<YourType>(); 
    const boost::python::converter::registration* reg = boost::python::converter::registry::query(info); 
    if (reg == NULL)  {
      //register YourType 
    } else if ((*reg).m_to_python == NULL) {
      //register YourType 
    }
    

    Note that you need to check also for ((*reg).m_to_python == NULL) otherwise you risk, in some architectures, that the registration does not happen as a default constructor because registration has been called assigning a NULL converter to YourType. In this case query(info) does return the address of the empty registration.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on an app, which has several modules. I will have to
I have a project with several modules, some depends on others, for example: X
Guys, I have much python code in modules which are resides in several python
I have flex application consisting of several modules which is configured using maven. I'm
I'm working on a site, which will have several modules that either fully available
I have a spring web application which has several modules. Each module has its
I have have a main project I am working on, which has several modules/directories.
In a maven project I have several modules which only have a persitence.xml for
I have several python modules (organized into packages), which depend on each other .
I have several modules of a project and i have made each module as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.