dfamonteiro/feupy

Feupy throws exception when parsing UC 444284

Closed this issue · 1 comments

Reproduction:

from feupy import CurricularUnit as UC
UC(444284)

Error message:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/daniel/Desktop/github/feupy/feupy/_CurricularUnit.py", line 150, in __init__
    self._parse_third_table(third_table)
  File "/home/daniel/Desktop/github/feupy/feupy/_CurricularUnit.py", line 200, in _parse_third_table
    self.curricular_years.append(int(row[0].string))
ValueError: invalid literal for int() with base 10: 'L:G'

UC link

A try-catch will work for now. A rewrite of the third table logic (and changing how that information is represented in the CurricularUnit object) is the only way to accurately represent the information in that table