Traceback (most recent call last):


 "/home/vladislav/projects/rope_test/tmpvyv3l_", line 12, in <module>

changes = ExtractMethod(myproject, ropy, 58, 140).get_changes('calc_it', similar=True)


 "/home/vladislav/.virtualenvs/rope_test/lib/python3.7/site-packages/rope/refactor/extract.py", line 69, in get_changes

new_contents = _ExtractPerformer(info).extract()


 "/home/vladislav/.virtualenvs/rope_test/lib/python3.7/site-packages/rope/refactor/extract.py", line 216, in extract

extract_info = self._collect_info()


 "/home/vladislav/.virtualenvs/rope_test/lib/python3.7/site-packages/rope/refactor/extract.py", line 244, in _collect_info

self._find_definition(extract_collector)


 "/home/vladislav/.virtualenvs/rope_test/lib/python3.7/site-packages/rope/refactor/extract.py", line 306, in _find_definition

collector.body_pattern = parts.get_body_pattern()


 "/home/vladislav/.virtualenvs/rope_test/lib/python3.7/site-packages/rope/refactor/extract.py", line 441, in get_body_pattern

return similarfinder.make_pattern(self._get_body(), variables)


 "/home/vladislav/.virtualenvs/rope_test/lib/python3.7/site-packages/rope/refactor/similarfinder.py", line 353, in make_pattern

for match in finder.get_matches('${%s}' % variable):


 "/home/vladislav/.virtualenvs/rope_test/lib/python3.7/site-packages/rope/refactor/similarfinder.py", line 102, in get_matches

match_start, match_end = match.get_region()


 "/home/vladislav/.virtualenvs/rope_test/lib/python3.7/site-packages/rope/refactor/similarfinder.py", line 256, in get_region

return self.ast.region
AttributeError: 'Name' object has no attribute 'region'

Traceback (most recent call last):


 "/usr/bin/pipenv", line 7, in <module>

from pipenv import cli


 "/usr/lib/python3.6/site-packages/pipenv/__init__.py", line 13, in <module>

from .cli import cli


 "/usr/lib/python3.6/site-packages/pipenv/cli.py", line 20, in <module>

import pip


 "/usr/lib/python3.6/site-packages/pip/__init__.py", line 26, in <module>

from pip.utils import get_installed_distributions, get_prog


 "/usr/lib/python3.6/site-packages/pip/utils/__init__.py", line 27, in <module>

from pip._vendor import pkg_resources


 "/usr/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3018, in <module>

@_call_aside


 "/usr/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3004, in _call_aside

f(*args, **kwargs)


 "/usr/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3046, in _initialize_master_working_set

dist.activate(replace=False)


 "/usr/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2578, in activate

declare_namespace(pkg)


 "/usr/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2152, in declare_namespace

_handle_ns(packageName, path_item)


 "/usr/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2092, in _handle_ns

_rebuild_mod_path(path, packageName, module)


 "/usr/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2121, in _rebuild_mod_path

orig_path.sort(key=position_in_sys_path)
AttributeError: '_NamespacePath' object has no attribute 'sort'
