Skip to content
This repository was archived by the owner on Mar 5, 2024. It is now read-only.
This repository was archived by the owner on Mar 5, 2024. It is now read-only.

UnboundLocalError: local variable 'first' referenced before assignment #19

@Tuisto59

Description

@Tuisto59

Traceback (most recent call last):
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1536, in call
return self.func(*args)
File "Launcher.py", line 1426, in gedcom_step1
self.get_data_gedcom()
File "Launcher.py", line 1044, in get_data_gedcom
name = " ".join(ind.name)
File "C:\Python27\lib\site-packages\gedcom_init_.py", line 431, in name
return first, last
UnboundLocalError: local variable 'first' referenced before assignment

It's because sometime surname have symbol like "/" to seperate different type of name

it's possible to split at the first "/" ? like:

        vals = preferred_name.value.split("/")

to:

        vals = preferred_name.value.split("/",1)

It's can work ?

Because some people add some special symbol into their Familly tree software like "SMIT/SMITH" in the surname. Now poeple like to add some more information to explain the different kind of writing a surname can have like :

Lefeivre, Lefelvre, Lefesvre, Lefeubvre, Lefeuve, Lefeuvre, Lefève, Lefever, Lefevere, Lefèvres, Lefebvre
or with slash
Lefeivre / Lefelvre / Lefesvre / Lefeubvre / Lefeuve / Lefeuvre / Lefève / Lefever / Lefevere / Lefèvres / Lefebvre

or regex-like to avoid the writting of all the surname form:

LEFE(I-L-S-U)(B)V(R)E(R)(E)

I use your library in my application, it's can be usefull i I can push out the surnmae and the firstname individually than to call the individu.name method

Thanks

Yoan
https://peregrination.jimdo.com/
https://github.com/Tuisto59/Peregrination

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions