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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:01:47+00:00 2026-06-03T20:01:47+00:00

I tried to load a page in my app, and the below error pop

  • 0

I tried to load a page in my app, and the below error pop up. I’m using tweepy to connect to twitter. And I don’t know where the error come from or the line I need to fix. Would love to know how I can solve this.

  UnicodeEncodeError at /test/

   'charmap' codec can't encode character u'\u2019' in position 6: character maps to   <undefined>

   Request Method:      GET
   Request URL:     http://127.0.0.1:8000/test/
   Django Version:  1.3.1
   Exception Type:  UnicodeEncodeError
   Exception Value: 'charmap' codec can't encode character u'\u2019' in position 6: character maps to <undefined>
  Exception Location:   C:\Python27\lib\encodings\cp437.py in encode, line 12
  Python Executable:    C:\Python27\python.exe
  Python Version:   2.7.2

Views.py

  def testdat(request):
      if request.method=="GET":
         treats=Cursor(api.list_timeline, owner=request.user, slug="").items(20)
         for treat in treats:
             print "%s\t%s\t%s\t%s" % (treat.text,
                                  treat.author.screen_name,
                                  treat.created_at,
                                  treat.source,)
             top=Twet(text= treat.text, author_screen_name= treat.author.screen_name, created_at= treat.created_at, source= treat.source)
             top.save()
        treats=Cursor(api.list_timeline, owner=request.user, slug='').items(20)
        return render_to_response('dashy.html',{'treats': treats},context_instance=RequestContext(request))
  • 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-03T20:01:51+00:00Added an answer on June 3, 2026 at 8:01 pm

    Stop printing. Figure out a different way of doing your debugging. Or, encode to UTF-8 first.

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

Sidebar

Related Questions

I want to load google.com into a page in my site. I tried using
I tried using $.load to load an entire page form the nytimes.com, because i
I've tried to load Disqus with ajax in my page, i'll explain. I have
I load a page in my app, the user does some modifications on it.
I'm using webrick to run my rails app in development mode. The page includes
I have an Android app using webview to load and display html pages. But
On my blog app, when the front page loads, I want the twitter share
I am building a simple rails app and when I load the home page
i have tried load and hebrew didn't work for me so i changed my
I just upgraded XCode to 4.3.2 and tried to load a project I am

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.