Discussion:
[Bitpim-devel] Please test importing
Roger Binns
2004-06-21 08:15:52 UTC
Permalink
For anyone who is running from source, I would appreciate it
if you can test importing. New in 0.7.13 is the ability to
import from vcards, evolution and outlook so try one or more
of them.

Thanks,

Roger
Peter Dufault
2004-06-21 15:58:57 UTC
Permalink
Post by Roger Binns
For anyone who is running from source, I would appreciate it
if you can test importing. New in 0.7.13 is the ability to
import from vcards, evolution and outlook so try one or more
of them.
Hi Roger. I tried it blindly and imported my entire address book, and
it looked promising but I had all my contacts including those without
phones. I decided to try it again only for people with phone numbers.
I canceled the import, selected import again, and bitpim died:

*** malloc[8216]: error for object 0x31fc50: Incorrect checksum for
freed object - object was probably modified after being freed; break at
szone_error

Bus error

I've attached the traceback.

If this is useless (or nearly so) I will try again tonight with gdb and
also try to duplicate the error with a smaller set, maybe even try to
"break at szone_error" as suggested. I don't have time right now.

(OS X 10.3.4, LGVX4500, VZW Mobile Office cable, vcards exported from
Apple's Address Book)

Peter

Peter Dufault
HD Associates, Inc.
Roger Binns
2004-06-21 20:26:02 UTC
Permalink
Post by Peter Dufault
If this is useless (or nearly so)
That is indeed the case. It is the usual wxwidgets 2.4 flakyness on Mac.

The good news is that they are currently going through the test cycle
for the next 2.5 release so we should have that soon.

Roger
Peter Dufault
2004-06-21 20:37:24 UTC
Permalink
Post by Roger Binns
Post by Peter Dufault
If this is useless (or nearly so)
That is indeed the case. It is the usual wxwidgets 2.4 flakyness on Mac.
The good news is that they are currently going through the test cycle
for the next 2.5 release so we should have that soon.
That means I shouldn't try to reduce the problem, and should instead
look forward to 2.5, right?

Tonight I'll try importing those vcards with phone numbers and see how
it goes.

BTW, I saw huge amounts of debugging scrolling by due to wallpaper
images in the Apple exported vCards that I assume are non-standard
vcardisms and so are ignored by bitpim. Will those command line
switches you suggested for the Mac in an earlier email shut that up?
If not, here's a feature request - just output the first 256 bytes of
an unrecognized vcard item. Yeah, I know, do it myself. I can't right
now, so instead I'll record this both for what it's worth and for the
record.

Peter

Peter Dufault
HD Associates, Inc.
Roger Binns
2004-06-21 23:13:25 UTC
Permalink
Post by Peter Dufault
That means I shouldn't try to reduce the problem, and should instead
look forward to 2.5, right?
It means that an Apple specific crash in the gui code is not useful
information to me since it won't be due to any issues in the BitPim
code itself :-)

You can run the command line vcard.py file specifying the vcard file
and you will get a dump of how BitPim interpretted the file contents,
and no guis are involved.
Post by Peter Dufault
BTW, I saw huge amounts of debugging scrolling by due to wallpaper
images in the Apple exported vCards that I assume are non-standard
vcardisms and so are ignored by bitpim.
Can you send me some samples? Ideally I would like a card with every
possible field filled in. Even better would be one with munged data
so I can include it in the examples file in the source.
Post by Peter Dufault
Will those command line
switches you suggested for the Mac in an earlier email shut that up?
The debug printing only happens if __debug__ is true, which is the
default for running Python. However the built distributions for
Windows and Linux are made with -OO which turns off debug so you
won't see the messages. That is part of the reason I was asking
Stephen to look into it.

Roger
Peter Dufault
2004-06-22 19:39:53 UTC
Permalink
Post by Roger Binns
Can you send me some samples? Ideally I would like a card with every
possible field filled in. Even better would be one with munged data
so I can include it in the examples file in the source.
Attached is Bill P. Bitpim's vCard.
Roger Binns
2004-06-22 21:04:44 UTC
Permalink
Post by Peter Dufault
Attached is Bill P. Bitpim's vCard.
Thanks. Would it be a useful feature if BitPim extracted the photo and automatically
made it the wallpaper for that person?

Roger
Peter Dufault
2004-06-22 23:16:32 UTC
Permalink
Post by Roger Binns
Thanks. Would it be a useful feature if BitPim extracted the photo and automatically
made it the wallpaper for that person?
I think so - that would work for me, since address book is where I
maintain the phone info.

I believe the address book images are 128x128 RGB. I don't see
anywhere to change the size.

Peter

Peter Dufault
HD Associates, Inc.
Roger Binns
2004-06-22 23:25:39 UTC
Permalink
Post by Peter Dufault
Post by Roger Binns
Thanks. Would it be a useful feature if BitPim extracted the photo and automatically
made it the wallpaper for that person?
I think so - that would work for me, since address book is where I
maintain the phone info.
I will try to get it into 0.7.14.
Post by Peter Dufault
I believe the address book images are 128x128 RGB. I don't see
anywhere to change the size.
That's alright. BitPim will gratioustously auto-resize the images
anyway :-)

Roger
Adit Panchal
2004-06-21 16:11:00 UTC
Permalink
Post by Roger Binns
For anyone who is running from source, I would appreciate it
if you can test importing. New in 0.7.13 is the ability to
import from vcards, evolution and outlook so try one or more
of them.
At our school, many of the administrators attach vCards to their
emails. I tried importing the following vCard and it just hung at the
screen giving a beachball. It never crashed though, even after 10 mins.
It looked like it was eating up the CPU as well.

I checked the mailer of several of the administrators and it says
Mozilla 4.76 - an older version of Netscape? Anyways, the contact
imports perfectly into the Mac Address Book. For some reason it's just
hanging up BitPim. I have munged the vCard data so you can take a look.
I am using Mac OS 10.3.4.

Adit
Roger Binns
2004-06-21 20:24:34 UTC
Permalink
Post by Adit Panchal
At our school, many of the administrators attach vCards to their
emails. I tried importing the following vCard and it just hung at the
screen giving a beachball. It never crashed though, even after 10 mins.
It looked like it was eating up the CPU as well.
Yes, it was stuck in an infinite loop. Of course I was expecting
problems with the big picture vcard code, not minor stuff which is
what the issue with this is.

There was a while statement that should have been an if that
was looping forever. (I still wish Python had the ability to
do break/continue out of multiple enclosing levels like sh
does).

The other problem was trailing whitespace on the begin line. I don't
know what the spec says about about that, but I had been treating all
characters as significant including leading and trailing whitespace. The
code no longer does that :-)
Post by Adit Panchal
I checked the mailer of several of the administrators and it says
Mozilla 4.76 - an older version of Netscape? Anyways, the contact
imports perfectly into the Mac Address Book. For some reason it's just
hanging up BitPim. I have munged the vCard data so you can take a look.
I am using Mac OS 10.3.4.
Thanks. It imports perfectly now. I have committed the fix, but if you want to
try manually, use this:

Index: vcard.py
===================================================================
RCS file: /cvsroot/bitpim/bitpim/vcard.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- vcard.py 21 Jun 2004 08:04:25 -0000 1.14
+++ vcard.py 21 Jun 2004 20:13:07 -0000 1.15
@@ -70,7 +70,7 @@
line+=":"

b4=line[:colon]
- line=line[colon+1:]
+ line=line[colon+1:].strip()

# upper case and split on semicolons
items=b4.upper().split(";")
@@ -140,7 +140,7 @@
# find vcard start
field=value=None
for field,value in self.vfile:
- while (field,value)!=(["BEGIN"], "VCARD"):
+ if (field,value)!=(["BEGIN"], "VCARD"):
continue
found=True
break


Roger
Adit Panchal
2004-06-21 21:09:18 UTC
Permalink
Post by Roger Binns
Thanks. It imports perfectly now. I have committed the fix, but if you want to
I fixed the lines and it works perfectly as you said. Thanks :)

I haven't been paying very much attention to the vCard discussion, but
I just noticed that in the card that I send you, the middle
name/initial is not separated when it is imported. Instead it remains
attached to the first name. Is middle name part of the vCard spec or
would you have to parse it out yourself? It's not a big deal for me,
but I thought I would let you know about the issue.

Adit
Roger Binns
2004-06-21 23:07:49 UTC
Permalink
Post by Adit Panchal
I haven't been paying very much attention to the vCard discussion, but
I just noticed that in the card that I send you, the middle
name/initial is not separated when it is imported. Instead it remains
attached to the first name. Is middle name part of the vCard spec or
would you have to parse it out yourself? It's not a big deal for me,
but I thought I would let you know about the issue.
That is how the vcard was supplied (ie BitPim interpretted the vcard correctly
but the information in the vcard is not correct).

The N field is specified as:

N:Last Name;First Name;Middle Names;Prefix;Suffix

The vcard was like this:

N:Doe;Jane A.

It should have been:

N:Doe;Jane;A.

Roger
Somerlot, Chris
2004-06-21 21:20:57 UTC
Permalink
Curiously, the outlook import works fine if importing when there are no
existing entries, but crashes if there are:

An unexpected exception has occurred.
Please see the help for details on what to do.

Traceback (most recent call last):
File "C:\Python23\lib\site-packages\wxPython\wx.py", line 1712, in
<lambda>
lambda event: event.callable(*event.args, **event.kw) )
File "C:\Program Files\BitPim\bitpim\phonebook.py", line 1158, in
DoMerge
results[count]=self.MergeEntries(self.existingdata[existingid],
self.importdata[i])
File "C:\Program Files\BitPim\bitpim\phonebook.py", line 1197, in
MergeEntries
result['numbers']=mergenumberlists(o['numbers'], i['numbers'])
File "C:\Program Files\BitPim\bitpim\phonebook.py", line 1427, in
mergenumberlists
print i
IOError: [Errno 9] Bad file descriptor

Variables by last 8 frames, innermost last

Frame __call__ in C:\Program Files\BitPim\bitpim\gui.py at line 364
self = <gui.MenuCallback instance at 0x015D0B48>
args = (<wxPython.events.wxCommandEventPtr instance; proxy
of C++ wxCommandEvent instan

Frame OnFileImportOutlookContacts in C:\Program
Files\BitPim\bitpim\importexport.py at line 1111
dlg = <importexport.ImportOutlookDialog instance; proxy of
C++ wxDialog instance at _1
data = {0: {'serials': [{'FolderID':
'00000000E75D19DC1541DE419A12C2ECB968C756010012871
parent = <gui.MainWindow instance; proxy of C++ wxFrame
instance at _170f4a8_wxFrame_p>

Frame importdata in C:\Program Files\BitPim\bitpim\phonebook.py at line
783
dlg = <phonebook.ImportDialog instance; proxy of C++
wxDialog instance at _17818c0_wxD
d = {0: {'serials': [{'FolderID':
'00000000E75D19DC1541DE419A12C2ECB968C756010012871
self = <phonebook.PhoneWidget instance; proxy of C++ wxPanel
instance at _176d2a8_wxPan
merge = True
importdata = {0: {'serials': [{'FolderID':
'00000000E75D19DC1541DE419A12C2ECB968C756010012871
categoriesinfo = []
result = None

Frame ShowModal in C:\Python23\lib\site-packages\wxPython\frames.py at
line 184
_kwargs = {}
self = <phonebook.ImportDialog instance; proxy of C++
wxDialog instance at _17818c0_wxD
_args = ()

Frame <lambda> in C:\Python23\lib\site-packages\wxPython\wx.py at line
1712
event = <wxPython.events.wxPyEvent instance; proxy of C++
wxPyEvent instance at _1956b98

Frame DoMerge in C:\Program Files\BitPim\bitpim\phonebook.py at line
1158
em = <phonebook.EntryMatcher instance at 0x019C66E8>
count = 36
confidence = 675
i = 36
usedexistingkeys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 2
results = {0: {'serials': [{'FolderID':
'00000000E75D19DC1541DE419A12C2ECB968C756010012871
matches = [(675, 36), (27, 35), (25, 20), (-41, 32), (-46, 25)]
existingid = 36
self = <phonebook.ImportDialog instance; proxy of C++
wxDialog instance at _17818c0_wxD
row = {0: (533, 0, 0, 0), 1: (533, 1, 1, 1), 2: (625, 2, 2,
2), 3: (675, 3, 3, 3), 4:

Frame MergeEntries in C:\Program Files\BitPim\bitpim\phonebook.py at
line 1197
key = 'numbers'
i = {'serials': [{'FolderID':
'00000000E75D19DC1541DE419A12C2ECB968C75601001287132A9
k = 'names'
o = {'serials': [{'FolderID':
'00000000E75D19DC1541DE419A12C2ECB968C75601001287132A9
importentry = {'serials': [{'FolderID':
'00000000E75D19DC1541DE419A12C2ECB968C75601001287132A9
dict = {'serials': [{'FolderID':
'00000000E75D19DC1541DE419A12C2ECB968C75601001287132A9
result = {'serials': [{'FolderID':
'00000000E75D19DC1541DE419A12C2ECB968C75601001287132A9
intersect = ['serials', 'addresses', 'numbers', 'emails',
'categories', 'names']
self = <phonebook.ImportDialog instance; proxy of C++
wxDialog instance at _17818c0_wxD
originalentry = {'serials': [{'FolderID':
'00000000E75D19DC1541DE419A12C2ECB968C75601001287132A9

Frame mergenumberlists in C:\Program Files\BitPim\bitpim\phonebook.py at
line 1427
i = {'type': 'home', 'number': '(713) 965-4114'}
res = [{'type': 'home', 'number': '(713) 965-4114'},
{'type': 'cell', 'number': '(832)
orig = [{'type': 'home', 'number': '(713) 965-4114'},
{'type': 'cell', 'number': '(832)
imp = [{'type': 'home', 'number': '(713) 965-4114'},
{'type': 'cell', 'number': '(832)
Roger Binns
2004-06-21 23:17:08 UTC
Permalink
Post by Somerlot, Chris
Curiously, the outlook import works fine if importing when there are no
print i
IOError: [Errno 9] Bad file descriptor
This is the first time I have heard of that happening in a developer
tree. It is a bug in Python itself. There is no reason why printing
(to stdout) should suddenly result in a bad file descriptor. It
did happen to a few people in the earlier days of bitpim on Windows.

I have now removed all the regular prints in phonebook. You can just
comment out that line to carry on testing.

Roger
Jim Smith
2004-06-23 04:17:21 UTC
Permalink
Maybe I just have Outlook on the brain again. I assume you're not talking
about photos in Outlook's vCards. I'm running Outlook 2000 on Windows 2000
and don't see an option in Outlook to add photos to vCards. When I opened
Peter's "Bill P. Bitpim"s vCard" Outlook created and opened a Contact for
him, but no photo.
Post by Peter Dufault
Post by Roger Binns
Thanks. Would it be a useful feature if BitPim extracted the photo and
automatically
made it the wallpaper for that person?
I think so - that would work for me, since address book is where I
maintain the phone info.
I will try to get it into 0.7.14.
Post by Peter Dufault
I believe the address book images are 128x128 RGB. I don't see
anywhere to change the size.
That's alright. BitPim will gratioustously auto-resize the images
anyway :-)

Roger
Roger Binns
2004-06-23 07:51:06 UTC
Permalink
Post by Jim Smith
Maybe I just have Outlook on the brain again. I assume you're not talking
about photos in Outlook's vCards.
Nope, Apple's vcards.
Post by Jim Smith
I'm running Outlook 2000 on Windows 2000
and don't see an option in Outlook to add photos to vCards.
Outlook doesn't support images in vcards or in its native data store.
Somewhat annoyingly Outlook doesn't even export all of its fields
to COM. The programmer doc even lists how the fields are mapped
to COM, and which ones aren't mapped.

Roger

Loading...