Skip to content

Contact attributes go missing when parsing vcf contacts (VCARD Version 2.1) #126

@darfRaider

Description

@darfRaider

Quick Summary
When a contact is imported, some attributes may get missing.

Context

  • VCARD Version 2.1
  • vObject version: 0.9.9
  • Python version: 3.13.9
  • Operating system and version: Ubuntu 24.04

Description
Some attributes are missing after a contact is parsed. Specifically the issue was observed for the TEL-tag where attribute WORK and CELL are dropped.

To Reproduce

import vobject

contact = """BEGIN:VCARD
VERSION:2.1
N:John;Doe;;;
FN:John Doe
TEL;WORK:225
TEL;CELL:+12345678901
END:VCARD"""

contact_obj = vobject.readOne(contact)
print(contact_obj.serialize())

The output is

BEGIN:VCARD
VERSION:2.1
FN:John Doe
N:John;Doe;;;
TEL:225
TEL:+12345678901
END:VCARD

Where TEL;WORK and TEL;CELL are reduced to TEL

Further Notes
Mention of WORK / CELL tag

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions