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

  • Home
  • SEARCH
  • 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 8705027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:15:09+00:00 2026-06-13T03:15:09+00:00

I don’t know if this should be posted under serverfault or stackoverflow. I don’t

  • 0

I don’t know if this should be posted under serverfault or stackoverflow. I don’t know if it’s a locale problem on my server or if it’s python or the OpenERP application that is acting up.

I have a OpenERP system and I have encountered a quite strange problem.

In the openERP modules there are some “print”-lines that various developers used for debugging the application.

Like these:

print "Value: %s" % variable

and

 print "Value: " + str(variable)

If I start OpenERP in a ordinary terminal it will run just fine in the foreground and print the debug log and the prints in the console. The application never gives me an exception.

Now to the problem!

Earlier I’ve started the application in a screen so that I could detach it and close my connection to the server while the application is till running.

The code does not throw any exception when run in a ‘screen’

Instead of a screen I want to have init.d script. I’ve made this script:

#!/bin/sh

# Configuration variables for openerp
DAEMON="/opt/openerp-server-6.0.3/bin/openerp-server.py"
ARGS="--config=/opt/openerp-server-6.0.3/openerp-server.conf"
NAME="openerp"
USER="openerp"
DESC="openerp"
PIDFILE="/var/run/$NAME.pid"

# Startup alternatives
case "$1" in
        start)
                echo "Starting ${DESC}"
                start-stop-daemon --start --background --pidfile $PIDFILE --chuid $USER --make-pidfile --exec $DAEMON -- $ARGS
                ;;
        stop)
                echo "Stopping ${DESC}"
                start-stop-daemon --stop --quiet --pidfile /var/run/${NAME}.pid --oknodo
                echo "${NAME}."
                ;;
        *)
                echo "Usage: start|stop"
        ;;
esac

The script works, it start and stops the server.

When I use the module that imports data from a excel file I get this exception. I also get the exception in other places in the code where it tries to print a string containing the swedish letters ‘åäö’.

UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\xe4′ in
position 3: ordinal not in range(128)

I thought it was something with the ‘start-stop-daemon’ command that changed the locale or somthing. So instead of forceing the application to the background with the argument ‘–background’ I tried this:

start-stop-daemon --start --pidfile $PIDFILE --chuid $USER --make-pidfile --exec $DAEMON -- $ARGS &> /dev/null

This solved the UnicodeEncodeError. All joy I thought. But!

Now I get a Input/Output error

IOError: [Errno 5] Input/output error

And the code that generates this

print pay_order

The ‘pay_order’ variable is a string that sometimes contain ‘åäö’.

I can’t understand why it behaves like this.

  • 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-13T03:15:11+00:00Added an answer on June 13, 2026 at 3:15 am

    I have experienced the Unicode errors while using print for debugging errors similar to what you describe.

    I think you should solve the problem at it’s root: use grep to find the lines with print commands in the addons, and comment them out with #. The print command is never used in the standard modules.

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

Sidebar

Related Questions

Don't know if this is an eclipse specific problem but whenever I declare a
Don't really know how to formulate the title, but it should be pretty obvious
I don't know why, but this code worked for me a month ago... maybe
Don't know if anyone can help me with this or if it's even possible.
I don't know: if this works. if it's a good idea. what it is
I don't know if this question is trivial or not. But after a couple
Don't know why this doesn't work. I can't do implicit animation for a newly
Don't know what's wrong here, when I run the application it says Specified method
Don't know if this is the right place to ask this, but I will
Don't know why this is happening, but after submitting a form via JS (using

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.