Skip to content

[Bug] g.gui.timeline fails with ctypes.OverflowError on Windows #2109

@petrasovaa

Description

@petrasovaa

Describe the bug
g.gui.timeline doesn't display anything, originally reported by @chaedri

To Reproduce
t.create output=test semantictype=mean title=title description=desc
t.register -i input=test maps=elev_lid792_1m@PERMANENT,elev_state_500m@PERMANENT start=2000-01-01 increment="1 month"
g.gui.timeline test

Traceback (most recent call last):
  File "C:\Program Files\GRASS GIS 8.0\Python39\lib\site-
packages\matplotlib\cbook\__init__.py", line 287, in process
    func(*args, **kwargs)
  File "C:\Program Files\GRASS GIS 8.0\Python39\lib\site-
packages\matplotlib\backend_bases.py", line 3061, in
mouse_move
    s = self._mouse_event_to_message(event)
  File "C:\Program Files\GRASS GIS 8.0\Python39\lib\site-
packages\matplotlib\backend_bases.py", line 3041, in
_mouse_event_to_message
    s = event.inaxes.format_coord(event.xdata, event.ydata)
  File "C:\Program Files\GRASS GIS 8.0\Python39\lib\site-
packages\matplotlib\axes\_base.py", line 4155, in
format_coord
    xs = self.format_xdata(x)
  File "C:\Program Files\GRASS GIS 8.0\Python39\lib\site-
packages\matplotlib\axes\_base.py", line 4137, in
format_xdata
    return (self.fmt_xdata if self.fmt_xdata is not None
  File "C:\Program Files\GRASS GIS 8.0\Python39\lib\site-
packages\matplotlib\ticker.py", line 239, in
format_data_short
    return self.format_data(value)
  File "C:\Program Files\GRASS GIS 8.0\Python39\lib\site-
packages\matplotlib\ticker.py", line 231, in format_data
    return self.__call__(value)
  File "C:\Program Files\GRASS GIS 8.0\Python39\lib\site-
packages\matplotlib\dates.py", line 973, in __call__
    result = self._formatter(x, pos)
  File "C:\Program Files\GRASS GIS 8.0\Python39\lib\site-
packages\matplotlib\dates.py", line 636, in __call__
    result = num2date(x, self.tz).strftime(self.fmt)
  File "C:\Program Files\GRASS GIS 8.0\Python39\lib\site-
packages\matplotlib\dates.py", line 528, in num2date
    return _from_ordinalf_np_vectorized(x, tz).tolist()
  File "C:\Program Files\GRASS GIS 8.0\Python39\lib\site-
packages\numpy\lib\function_base.py", line 2113, in __call__
    return self._vectorize_call(func=func, args=vargs)
  File "C:\Program Files\GRASS GIS 8.0\Python39\lib\site-
packages\numpy\lib\function_base.py", line 2197, in
_vectorize_call
    outputs = ufunc(*inputs)
  File "C:\Program Files\GRASS GIS 8.0\Python39\lib\site-
packages\matplotlib\dates.py", line 357, in _from_ordinalf
    dt = dt.replace(tzinfo=dateutil.tz.gettz('UTC'))
  File "C:\Program Files\GRASS GIS 8.0\Python39\lib\site-
packages\dateutil\tz\tz.py", line 1557, in __call__
    rv = self.nocache(name=name)
  File "C:\Program Files\GRASS GIS 8.0\Python39\lib\site-
packages\dateutil\tz\tz.py", line 1648, in nocache
    tz = tzwin(name)
  File "C:\Program Files\GRASS GIS 8.0\Python39\lib\site-
packages\dateutil\tz\win.py", line 223, in __init__
    keydict = valuestodict(tzkey)
  File "C:\Program Files\GRASS GIS 8.0\Python39\lib\site-
packages\dateutil\tz\win.py", line 366, in valuestodict
    value = tz_res.name_from_string(value)
  File "C:\Program Files\GRASS GIS 8.0\Python39\lib\site-
packages\dateutil\tz\win.py", line 124, in name_from_string
    return self.load_name(offset)
  File "C:\Program Files\GRASS GIS 8.0\Python39\lib\site-
packages\dateutil\tz\win.py", line 93, in load_name
    nchar = self.LoadStringW(self._tzres._handle, offset,
lpBuffer, 0)
ctypes.ArgumentError: argument 1: <class 'OverflowError'>:
int too long to convert

Also can be simply reproduced with example from dateutil/tz/win.py tzres.load_name method:

from dateutil.tzwin import tzres
tzr = tzres()
tzr.load_name(112)

System description (please complete the following information):

  • Operating System: Windows 10 Enterprise 64bit
  • GRASS GIS 8.0.0RC2

Additional context
This is not a problem of g.gui.timeline rather perhaps some packaging issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    backport to 8.4PR needs to be backported to release branch 8.4bugSomething isn't workingtemporalRelated to temporal data processingwindowsMicrosoft Windows specific

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions