473,763 Members | 1,312 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem: saving files in IDLE

Hi,

I've got a Problem when I want to save a .py file in
Idle. Most times it works, but sometimes I can't save
my file. In the "Python Shell" Window, I get the message:

Exception in Tkinter callback
Traceback (most recent call last):
File
"/var/tmp/python-2.2.2-build//usr/lib/python2.2/lib-tk/Tkinter.py", line
1343, in __call__
return apply(self.func , args)
File "/usr/lib/idle/IOBinding.py", line 136, in save_as
if self.writefile( filename):
File "/usr/lib/idle/IOBinding.py", line 151, in writefile
chars = str(self.text.g et("1.0", "end-1c"))
UnicodeError: ASCII encoding error: ordinal not in range(128)

What can I do?
Thanks,
Tom

Jul 18 '05 #1
1 2633
Florian Wellner wrote:
Hi,

I've got a Problem when I want to save a .py file in
Idle. Most times it works, but sometimes I can't save
my file. In the "Python Shell" Window, I get the message:

Exception in Tkinter callback
Traceback (most recent call last):
File
"/var/tmp/python-2.2.2-build//usr/lib/python2.2/lib-tk/Tkinter.py", line
1343, in __call__
return apply(self.func , args)
File "/usr/lib/idle/IOBinding.py", line 136, in save_as
if self.writefile( filename):
File "/usr/lib/idle/IOBinding.py", line 151, in writefile
chars = str(self.text.g et("1.0", "end-1c"))
UnicodeError: ASCII encoding error: ordinal not in range(128)

What can I do?


Try to upgrade to Python 2.3 (CVS if possible) since this
containes idle 1.0beta2 and is IMHO much better.

--
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany

Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1487
by: Thomas Weber | last post by:
Hi, I've got a Problem when I want to save a .py file in Idle. Most times it works, but sometimes I can't save my file. In the "Python Shell" Window, I get the message: Exception in Tkinter callback Traceback (most recent call last): File "/var/tmp/python-2.2.2-build//usr/lib/python2.2/lib-tk/Tkinter.py", line
2
2171
by: Thomas Rivas | last post by:
Unable to launch IDLE(fork?) from the new Py 2.3. Anybody else have this problem. Solutions? Thanks. Tom Rivas
0
1167
by: Mark Carter | last post by:
Is there a way of programmatically saving the text in an IDLE session?
1
5554
by: Moosebumps | last post by:
So say I am working on two separate .py files in IDLE that are part of the same program. Does anyone have problems where when you modify one file, and then run the other, the changes you made in the first aren't updated? I usually just close all the files, and restart IDLE, but this is a pain. Maybe because I always use right click -> edit with IDLE (on Windows). That starts up a separate Python Shell too, which I always close. MB
12
2768
by: Richard Hanson | last post by:
Over the last few days, I reinstalled Win2kSP2 to a spare harddrive I had just swapped into my Fujitsu LifeBook P1120 (long story <wink>). Subsequently, I DL'ed the newest Python alpha (2.4a2), and when trying to install it, I immediately got this error: This installation package cannot be installed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service.
0
2196
by: mchl gdbt | last post by:
Hi, I have several thousand tiffs generated by application A which are read by application B. I need to remove a few colours from the tiffs and I decided to try with the python imaging library. Running under debug mode permits saving my tiff files (with Image.DEBUG=0, the save doesn't work! see below) , but it truncates the crazy tags in my tiff and changes the resolution of the image
3
6318
by: ChrisWinterscheid | last post by:
We are running DB2 8.1 on AIX 5.2. DB2level shows: DB21085I Instance "db2inst1" uses "32" bits and DB2 code release "SQL08016" with level identifier "02070106". Informational tokens are "DB2 v8.1.1.56", "s040616", "U497635", and FixPak "6". Product is installed at "/usr/opt/db2_08_01".
1
6570
by: JohnJohnUSA | last post by:
I am using Python IDLE 2.4.3 on Windows XP. I use File->New Window to create a new program. In the Save As dialog, it always takes me to the python program directory (where python is installed). Since this is not where I want to save my source file, I have to select the directory I want. Is there a way that I can have python always bring up the Save As dialog pointing to the directory of my choice? In other words, I would like to...
7
12890
by: siggi | last post by:
Hi all, when I do >>>sys.path in IDLE (winXP), i get a horrendously long list of paths, paths I may have used during a lot of trials and errors. How can I clean up sys.path? I mean, trim it of unnecessary paths? So far, I know only the command >>>sys.path.append(r'c:....etc...'), but how to delete or insert at the beginning of the list, I know not. Thanks,
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9998
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9938
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8822
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3523
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.