You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The version 5.7.14 for python2breaks installation of notebook extensions. Running jupyter contrib nbextension install --user fails with TypeError: '_sre.SRE_Match' object has no attribute '__getitem__'
Expected behavior
Running jupyter contrib nbextension install --user should succeed.
Additional context
Reinstalling 5.7.13 (pip install notebook==5.7.13) resolve the issue. My understanding is that this commit introduce an issue. The following code
importre__version__='5.7.14'# Build up version_info tuple for backwards compatibilitypattern=r'(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)'match=re.match(pattern, __version__)
parts= [int(match[part]) forpartin ['major', 'minor', 'patch']]
ifmatch['rest']:
parts.append(match['rest'])
version_info=tuple(parts)
It returns TypeError: '_sre.SRE_Match' object has no attribute '__getitem__' like in the described bug. According to this this syntax was only added with python3.6.
Replacing the code by the following one works.
importre__version__='5.7.14'# Build up version_info tuple for backwards compatibilitypattern=r'(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)'match=re.match(pattern, __version__)
parts= [int(match.group(part)) forpartin ['major', 'minor', 'patch']]
ifmatch.group('rest'):
parts.append(match.group('rest'))
version_info=tuple(parts)
The text was updated successfully, but these errors were encountered:
Describe the bug
The version 5.7.14 for python2breaks installation of notebook extensions. Running
jupyter contrib nbextension install --user
fails withTypeError: '_sre.SRE_Match' object has no attribute '__getitem__'
To Reproduce
Steps to reproduce the behavior:
jupyter contrib nbextension install --user
Expected behavior
Running
jupyter contrib nbextension install --user
should succeed.Additional context
Reinstalling 5.7.13 (
pip install notebook==5.7.13
) resolve the issue. My understanding is that this commit introduce an issue. The following codeIt returns
TypeError: '_sre.SRE_Match' object has no attribute '__getitem__'
like in the described bug. According to this this syntax was only added with python3.6.Replacing the code by the following one works.
The text was updated successfully, but these errors were encountered: