lmaurits / BEASTling

A linguistics-focussed command line tool for generating BEAST XML files.
BSD 2-Clause "Simplified" License
20 stars 6 forks source link

OSError: File name too long, instead of being interpreted as list #249

Open Anaphory opened 5 years ago

Anaphory commented 5 years ago

I am trying to run BEASTling on my configuration files from earlier, and I get

OSError: [Errno 36] File name too long: 'eleven, twelve, thirteen, fourteen, fifteen, sixteen, seventeen,\neighteen, nineteen, twenty, twenty_one, twenty_two, twenty_three,\ntwenty_four, twenty_five, thirty, forty, fifty, sixty, seventy, eighty,\nninety, one_hundred_and_twenty_three, two_hundred, one_hundred_thousand,'

in

https://github.com/xrotwang/BEASTling/blob/3379253cfeefd4194677c266d4ce5faa108fffae/beastling/sections.py#L114

I assume this was not picked up by the tests because none of our tests try to work with lists of this lengths – 275 characters in this case. I will happily patch my local version with a try: except OSError: for now, but I'm not sure that's the best way to handle this.

Anaphory commented 4 years ago

I just got this again.

  File "/home/gereon/Develop/BEASTling/beastling/sections.py", line 141, in get_tree
    if fname.exists() and fname.is_file():
  File "/usr/lib/python3.8/pathlib.py", line 1388, in exists
    self.stat()
  File "/usr/lib/python3.8/pathlib.py", line 1194, in stat
    return self._accessor.stat(self)
OSError: [Errno 36] File name too long: '((Tiriyo,Tiriyo_old),Akuriyo,Karihona,KarinaSur,KarinaVen,(Wayana,Wayana_old),Apalai,Hixkaryana,Waiwai,Katxuyana,Akawaio,Patamuna,Pemon,Arekuna,Taurepang,Makushi,Sapara,Purukoto,Wayumara,Palmella,Tamanaku,Chayma,Cumanagoto,OponCarare,Mapoyo,Yawarana,Pemono,Panare,Dekwana,Waimiri,Yukpa,Bakairi,Ikpeng,Arara,Kuhikugu,Pimenteira)'

(My local version now obviously includes @xrotwang 's branch)