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 8552259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:23:11+00:00 2026-06-11T14:23:11+00:00

I develop an application in C++ with WWW interface in Django. So far I

  • 0

I develop an application in C++ with WWW interface in Django.
So far I have working framework in C++ with Boost.Python wrapper compiled to shared object in Linux.

Now I try to run this framework in Django. When I pass string from form “CharField” I get this error:

Python argument types in
CoreSystem.setOutput(CoreSystem, unicode)
did not match C++ signature:
setOutput(CoreSystem {lvalue}, std::string)

Code responsible for that is here:

form = AnalyzeForm(request.POST)
if form.is_valid():
    cd = form.cleaned_data
    s.setOutput(cd["output"])

where s is this CoreSystem object. If I type it like this:

s.setOutput("DatabaseOutput")

it works fine. I used also str(cd[“output”]) but after that nothing happens.

I’m using Django 1.4.1 and Python 2.7.3

  • 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-11T14:23:12+00:00Added an answer on June 11, 2026 at 2:23 pm

    You can use the encode method to convert a Unicode string to a byte string before sending it off to the C++ code that expects a string:

    s.setOutput(cd["output"].encode("utf-8"))
    

    The UTF-8 encoding is a reasonable default for Unicode strings. If cd["output"] is already an ASCII string, encoding will not change it; if it contains binary data, you will get an exception.

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

Sidebar

Related Questions

I have to develop a application (Winforms-application) which is connected to a database within
In order to develop qt application on eclipse, i have installed mingw, qt and
I am using php to develop an application, i have different set of url's
I'm working with the ChemAxon JChem cheminformatics application to develop a web-based browsable and
I have just started to develop android application yesterday and having a great fun
I am trying to develop a web application. I started creating a Play! Framework
I have a school project, for which I want to develop a web application
Develop an application on Compact Framework. net 3.5 c# for Windows Mobile 6.x. In
I have a VB6 application, the installer is compiled using INNO Setup. The installer
Goals: Be able to rapidly develop an application in MVC3 Have validation in one

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.