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

The Archive Base Latest Questions

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

I would like to write something to a file (a result obtained from GNUPG)

  • 0

I would like to write something to a file (a result obtained from GNUPG) using Python in Linux so that I can read it in later and see whether the signature and data are still valid.

When I try to write the result to file in the following way (lines 16-18 from my code):

with open(“result.txt”, “w”) as my_file:
    pickle.dump(signed_data, my_file)
my_file.close()

I get the following problem:

python eg1.py 
    File "eg1.py", line 16
SyntaxError: Non-ASCII character '\xe2' in file eg1.py on line 16, but no encoding     declared; see http://www.python.org/peps/pep-0263.html for details

Although I could change to problematic values to something else and change them back when I read them back in later, I am wondering if it will be possible for me to simply save the file as I intend do without changing it?

  • 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-07T15:11:26+00:00Added an answer on June 7, 2026 at 3:11 pm

    This error message has no relation to the binary stuff (signed_data) you want to write, but with the python source file. You gave no indication, what line number 16 is, but the typographic apostrophes in the “open”-line could be the reason.

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

Sidebar

Related Questions

I would like to write an if statement that will do something base on
I would like to write a League Fixture generator in python, but I can't.
Update: sample file sample workbook Problem : I would like to have something that
Am working in VC++ 2008 (express) and I would like to write something in
I would like to be able to write something like char f(char); vector<char> bar;
Would you write something like: enum XYZ_TYPE {X=1, Y=2, Z=3}; I saw it and
I would like to write a function that creates a plot of a set
I would like to write an if statement that would continue to repeat a
I would like to write a query that returns a single date value, that
I'm writing something that is a bit like Facebook's shared link preview. I would

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.