datetime module error

Create issue
Issue #3171 resolved
LeaRning created an issue

code

import datetime
datetime.datetime.strptime('1900-01-01', "%Y-%m-%d")

stderr:

RPython traceback:
File "pypy_interpreter.c", line 47805, in BuiltinCode1_fastcall_1
File "implement_1.c", line 57339, in fastfunc_descr_lower_1_1
File "pypy_objspace_std_7.c", line 39925, in _lower_unicode
File "rpython_rlib.c", line 15585, in _nonascii_unichr_as_utf8_append

Traceback (most recent call last):
File "H:\test.py", line 230, in <module>
season_data_list = month_kline_to_season_kline(month_data_list)
File "H:\test.py", line 93, in month_kline_to_season_kline
datetime.datetime.strptime('1900-01-01', "%Y-%m-%d"),
File "C:\Program Files\pypy3.6-v7.3.0-win32\lib-python\3\datetime.py", line 1774, in strptime
import _strptime
File "C:\Program Files\pypy3.6-v7.3.0-win32\lib-python\3_strptime.py", line 280, in <module>
_TimeRE_cache = TimeRE()
File "C:\Program Files\pypy3.6-v7.3.0-win32\lib-python\3_strptime.py", line 194, in init
self.locale_time = LocaleTime()
File "C:\Program Files\pypy3.6-v7.3.0-win32\lib-python\3_strptime.py", line 76, in init
self.__calc_timezone()
File "C:\Program Files\pypy3.6-v7.3.0-win32\lib-python\3_strptime.py", line 174, in __calc_timezone
no_saving = frozenset({"utc", "gmt", self.tzname[0].lower()})
SystemError: unexpected internal exception (please report a bug): <OutOfRange object at 0x3dfb61c>; 
internal traceback was dumped to stderr
[Finished in 0.3s with exit code 1]

Comments (9)

  1. mattip

    Should be fixed in 6569684f0955 which will be part of an upcoming release. You can verify this using a nightly build. Also note our issue tracker is now at foss.heptapod.net/pypy/pypy, so I will close this. If needed please open a new issue there.

  2. LeaRning reporter

    Thanks for relpy.

    I’ve downloaded nightly build ver binaries from http://buildbot.pypy.org/nightly/release-pypy3.6-v7.x/

    (url : http://buildbot.pypy.org/nightly/release-pypy3.6-v7.x/pypy-c-jit-latest-win32.zip date:2020-03-24),but code still couldn’t run.

    Got error message:

    RPython traceback:
      File "pypy_interpreter.c", line 44683, in BuiltinCode2_fastcall_2
      File "pypy_objspace_std_6.c", line 30901, in W_UnicodeObject_descr_partition
    RPython traceback:
      File "pypy_interpreter.c", line 44683, in BuiltinCode2_fastcall_2
      File "pypy_objspace_std_6.c", line 30901, in W_UnicodeObject_descr_partition
    SystemError: unexpected internal exception (please report a bug): <CheckError object at 0x2ea65b0>; internal traceback was dumped to stderr
    

  3. mattip

    @Armin Rigo can you still reproduce the failure with a non-english version of windows on pypy3.6-v7.3.1?

  4. Armin Rigo

    I'm serious, let's stop using this issue tracker. This page will be deleted and its content lost soon.

  5. Log in to comment