Assuming the CVS code had time to get updated before I did a check out a few
minutes ago, I got the included exception. This is with a Sanyo PM-8200 on
Windows 2000 SP4. The file was a 10K JPG which was imported into BitPim as a
32K PNG.
This may or may not be related. Because the imported file becomes too big
for the phone, I have tried converting some JPG's to PNG myself with
IrfanView. When I imported the 13K PNG file into the release version of
BitPim, it grew to 31K, and of course wouldn't download to the phone.
Jim
An unexpected exception has occurred.
Please see the help for details on what to do.
Traceback (most recent call last):
File "D:\Projects\BitPim\gui.py", line 150, in run
res=call()
File "D:\Projects\BitPim\gui.py", line 90, in __call__
return apply(self.method, self.args+args, d)
File "D:\Projects\BitPim\gui.py", line 1160, in senddata
apply(func, args)
File "D:\Projects\BitPim\gui.py", line 1167, in writewallpaper
return self.commphone.savewallpapers(data, merge)
File "D:\Projects\BitPim\com_sanyo.py", line 785, in savewallpapers
return self.savemedia('wallpapers', 'wallpaper-index', 'images',
results, merge)
File "D:\Projects\BitPim\com_sanyo.py", line 853, in savemedia
content = self.convertto8bitpng(content)
File "D:\Projects\BitPim\com_sanyo.py", line 109, in convertto8bitpng
f.write(pngdata)
IOError: (0, 'Error')
Variables by last 8 frames, innermost last
Frame __bootstrap in D:\Python23\lib\threading.py at line 436
self = <WorkerThread(BitPim helper, started daemon)>
Frame run in D:\Projects\BitPim\gui.py at line 143
e = <exceptions.IOError instance at 0x02211850>
res = None
self = <WorkerThread(BitPim helper, started daemon)>
item = (<gui.Request instance at 0x022118F0>, <gui.Callback
instance at 0x022117D8>)
call = <gui.Request instance at 0x022118F0>
ex = <exceptions.IOError instance at 0x02211850>
resultcb = <gui.Callback instance at 0x022117D8>
first = 0
Frame __call__ in D:\Projects\BitPim\gui.py at line 90
self = <gui.Request instance at 0x022118F0>
args = ()
d = Keys []
{}
kwargs = Keys []
{}
Frame senddata in D:\Projects\BitPim\gui.py at line 1160
count = 0
self = <WorkerThread(BitPim helper, started daemon)>
args = [{'wallpaper-index': {2020: {'origin': 'images', 'name':
'Fenwick Light House.jp
xx = (<bound method WorkerThread.writewallpaper of
<WorkerThread(BitPim helper, start
dict = Keys ['ringtone-index', 'uniqueserial',
'wallpaper-index', 'wallpapers']
{'wallpaper-index': {2020: {'origin': 'images', 'name':
'Fenwick Light House.jpg
func = <bound method WorkerThread.writewallpaper of
<WorkerThread(BitPim helper, starte
todo = [(<bound method WorkerThread.writewallpaper of
<WorkerThread(BitPim helper, star
desc = 'Wallpaper'
Frame writewallpaper in D:\Projects\BitPim\gui.py at line 1167
merge = True
self = <WorkerThread(BitPim helper, started daemon)>
data = Keys ['ringtone-index', 'uniqueserial',
'wallpaper-index', 'wallpapers']
{'wallpaper-index': {2020: {'origin': 'images', 'name':
'Fenwick Light House.jpg
Frame savewallpapers in D:\Projects\BitPim\com_sanyo.py at line 785
merge = True
self = <com_sanyo8200.Phone instance at 0x022114E0>
results = Keys ['ringtone-index', 'uniqueserial',
'wallpaper-index', 'wallpapers']
{'wallpaper-index': {2020: {'origin': 'images', 'name':
'Fenwick Light House.jpg
Frame savemedia in D:\Projects\BitPim\com_sanyo.py at line 853
key = -1
index = Keys [-1]
{-1: {'data':
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x84\x00\x00\x00\x
errors = False
name = u'sung lee.png'
idx = -1
mediaindexkey = 'wallpaper-index'
mediakey = 'wallpapers'
k = 2015
results = Keys ['ringtone-index', 'uniqueserial',
'wallpaper-index', 'wallpapers']
{'wallpaper-index': {2020: {'origin': 'images', 'name':
'Fenwick Light House.jpg
efile = u'sung lee.png'
mediatype = 'images'
content =
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x84\x00\x00\x00\x90\x08\x06
\x00
merge = True
init = Keys ['images']
{'images': {-1: {'data':
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x84\x0
wpi = Keys [2013, 2015, 2020, 2022, 2024, 2097, 2099, 2101,
2103, 2105, 3000]
{2020: {'origin': 'images', 'name': 'Fenwick Light
House.jpg'}, 2022: {'origin':
w = 0
wp = Keys [0]
{0: {'data':
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x84\x00\x00\x00\x9
data =
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x84\x00\x00\x00\x90\x08\x06
\x00
self = <com_sanyo8200.Phone instance at 0x022114E0>
Frame convertto8bitpng in D:\Projects\BitPim\com_sanyo.py at line 109
ncolortry = 256
f = <open file
'D:\Projects\BitPim\helpers\pngtopnm.exe>c:\docume~1\jamesr~1.smi\loc
ncolor = 256
self = <com_sanyo8200.Phone instance at 0x022114E0>
helpersdirectory = 'D:\\Projects\\BitPim\\helpers'
pngdata =
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x84\x00\x00\x00\x90\x08\x06
\x00
p = 'D:\\Projects\\BitPim'
ncolormax = 257
pnm =
'c:\\docume~1\\jamesr~1.smi\\locals~1\\temp\\tmpohpnbr.pnm'
pnmtopngbin = 'D:\\Projects\\BitPim\\helpers\\pnmtopng.exe'
ppmquantbin = 'D:\\Projects\\BitPim\\helpers\\ppmquant.exe'
size = 31991
ncolormin = 1
osext = '.exe'
pngtopnmbin = 'D:\\Projects\\BitPim\\helpers\\pngtopnm.exe'