CJ001 / google-shared-contacts-client

Automatically exported from code.google.com/p/google-shared-contacts-client
Apache License 2.0
0 stars 0 forks source link

Syntax Error #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Running the script on WinXP SP3 Using Python 2.6
2. command is: C:\Python26\Google>c:\python26\python shared_contacts.py --
admin=(left out) --import=gal.csv --output=load.csv

What is the expected output? What do you see instead?
I get the 56 contact record email addresses presented to me.  When it gets 
to Mutating 56 Contact(s) it fails with the message below:

Traceback (most recent call last):
  File "shared_contacts.py", line 796, in <module>
    main()
  File "shared_contacts.py", line 782, in main
    dry_run=dry_run)
  File "shared_contacts.py", line 380, in ImportMsOutlookCsv
    mutated_result.PrintResult(action, contact_id, new_entry, details)
  File "shared_contacts.py", line 433, in PrintResult
    existing_entry = gdata.contacts.ContactEntryFromString
(self.status.text)
  File "c:\python26\lib\site-packages\gdata\contacts\__init__.py", line 
307, in
ContactEntryFromString
    return atom.CreateClassFromXMLString(ContactEntry, xml_string)
  File "c:\python26\lib\site-packages\atom\__init__.py", line 93, in 
optional_wa
rn_function
    return f(*args, **kwargs)
  File "c:\python26\lib\site-packages\atom\__init__.py", line 125, in 
CreateClas
sFromXMLString
    tree = ElementTree.fromstring(xml_string)
  File "<string>", line 85, in XML
SyntaxError: syntax error: line 1, column 0

What version of the product are you using? On what operating system?
Python 2.6, gdata 2.0.1, shared contacts 1.0.1

Original issue reported on code.google.com by ggill...@gmail.com on 27 Jul 2009 at 6:43

GoogleCodeExporter commented 8 years ago

same error on Linux:

Traceback (most recent call last):
  File "shared_contacts.py", line 790, in <module>
    main()
  File "shared_contacts.py", line 776, in main
    dry_run=dry_run)
  File "shared_contacts.py", line 383, in ImportMsOutlookCsv
    mutated_result.PrintResult(action, contact_id, new_entry, details)
  File "shared_contacts.py", line 436, in PrintResult
    existing_entry = gdata.contacts.ContactEntryFromString(self.status.text)
  File "/home/user/google-shared-contacts-client/gdata/contacts/__init__.py", line
307, in ContactEntryFromString
    return atom.CreateClassFromXMLString(ContactEntry, xml_string)
  File "/home/user/google-shared-contacts-client/atom/__init__.py", line 93, in
optional_warn_function
    return f(*args, **kwargs)
  File "/home/user/google-shared-contacts-client/atom/__init__.py", line 125, in
CreateClassFromXMLString
    tree = ElementTree.fromstring(xml_string)
  File "<string>", line 85, in XML
SyntaxError: syntax error: line 1, column 0

Using:
Python 2.6.2, gdata 2.0.1, shared contacts 1.0.1
CSV file exported from Outlook 2003, windows CSV (UTF-8 Unicode English text)

Original comment by blinkid...@gmail.com on 19 Aug 2009 at 3:57

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
The script seems to be encountering an error on any row that has the "Company 
Main
Phone" field populated, in spite of it being a valid field for import.  I've 
moved
the data from that field to another one and it runs without
issue on a 2800 line CSV that used to fail on the first entry with that field
populated (reliably stopping at line 182).

The same error is also encountered on contact items over 2KB, it would be nice 
if the
error reporting had the server response, or at least validated the data to 
conform to
the pre-reqs instead of just exiting and leaving it up to the user to find the
problem.  That said, user input is the problem here.

Original comment by blinkid...@gmail.com on 26 Aug 2009 at 6:40

GoogleCodeExporter commented 8 years ago
Hi guys we just fixed q little issue on the "Company Main Phone" field. Could 
some of you please try with the new 
version? (i.e. v1.1.2) and let us know.

If this still do not work for you please attach a file that provokes the issue.

Original comment by api.nico...@gtempaccount.com on 19 Apr 2010 at 3:51