Python Forum
Thread Rating:
  • 2 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error in PyScripter
#1
I started to learn Python and wrote my first program in PyScripter

# coding: utf-8
print ("Hello!")

But when I press "Run" button it shows me this error: UnicodeEncodeError: 'ascii' codec can't encode characters in postion 32-38: ordinal not in range (128). In Menu - Edit - File format I've already changed coding to UTF-8, but still doesn't work. I don't know what to do else. Please help, if you know.
Reply
#2
Does it work if you try using Python in a terminal rather than the IDE? You've only posted 32 characters by the way, so it looks like either you haven't included all of your code or it's invisible characters that are causing the problem.
Reply
#3
The error message make no sense with the code you posted.
I have PyScripter and it do work with the code you postet(python 2 and 3),
so there have to something else that is not shown here.
Reply
#4
(Jan-16-2017, 06:14 PM)snippsat Wrote: The error message make no sense with the code you posted.
I have PyScripter and it do work with the code you postet(python 2 and 3),
so there have to something else that is not shown here.
What do you mean?
What can it be?
I don't understand.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pyscripter debugging ChrisM 3 1,738 Aug-25-2021, 08:27 PM
Last Post: Larz60+
  Pyscripter Error Zman350x 2 3,276 Feb-10-2017, 11:26 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020