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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:38:17+00:00 2026-05-26T16:38:17+00:00

I get the following error when trying to render foreign chars from a dict.

  • 0

I get the following error when trying to render foreign chars from a dict. Do you have any idea what I should do?

File "/base/data/home/apps/s~montaoproject/cap.354503891062679364/main.py", line 333, in render_jinja
    self.response.out.write(template.render(data))
  File "/base/data/home/apps/s~montaoproject/cap.354503891062679364/jinja2/environment.py", line 894, in render
    return self.environment.handle_exception(exc_info, True)
  File "/base/data/home/apps/s~montaoproject/cap.354503891062679364/templates/list_jinja.html", line 199, in top-level template code
    {% for key,value in location_map_br_11_cap.items() %}<option value="3" >{{ value.name }}</option>{% endfor %}
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 9: ordinal not in range(128)

Here is my variable:

location_map_br_11_cap = {1: {
    'name': str('Toda Região 11 (ddd)'),
    'lat': -23.55,
    'long': -46.64,
    'radius': 294200,
    }, 2: {
    'name': str('Todo Estado de São Paulo'),
    'lat': -22.90,
    'long': -43.21,
    'radius': 294200,
    }, 1: {
    'name': str('Toda região Sudeste do Brasil'),
    'lat': -23.55,
    'long': -46.64,
    'radius': 294200,
    }}

I will try this with some hope that it will succeed:

location_map_br_11_cap = {1: {
    'name': str('Toda Região 11 (ddd)').decode('utf-8'),
    'lat': -23.55,
    'long': -46.64,
    'radius': 294200,
    }, 2: {
    'name': str('Todo Estado de São Paulo').decode('utf-8'),
    'lat': -22.90,
    'long': -43.21,
    'radius': 294200,
    }, 1: {
    'name': str('Toda região Sudeste do Brasil').decode('utf-8'),
    'lat': -23.55,
    'long': -46.64,
    'radius': 294200,
    }}
  • 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-05-26T16:38:17+00:00Added an answer on May 26, 2026 at 4:38 pm

    Your location_map_br_11_cap variable contains values that have names which are raw strings rather than unicode strings. Convert your strings to Unicode, so Jinja knows how to encode them when it generates the template.

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

Sidebar

Related Questions

I get the following error from the SQL Script I am trying to run:
Why do I get following error when trying to start a ruby on rails
I get the following error when trying to run the latest Cygwin version of
When trying to set DoMatchParen I get the following error: E492: Not an editor
I'm trying to call the SQL statement below but get the following error: System.Data.SqlClient.SqlException:
I'm trying to run selenium-rc in bsd and get the following error 12:45:40.740 WARN
when trying to translate the confirmation message to Norwegian i get the following error:
Trying to create a QtRuby application, I get the following error: /usr/lib64/ruby/site_ruby/1.8/Qt/qtruby4.rb:2144: [BUG] Segmentation
I am trying to insert a time only value, but get the following error
When trying to validate my site, I get the following error: Line 188, column

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.