Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'PackageDescriptor' object has no attribute 'realpath' #14

Closed
DomenicP opened this issue Mar 27, 2020 · 2 comments · Fixed by #15
Closed

AttributeError: 'PackageDescriptor' object has no attribute 'realpath' #14

DomenicP opened this issue Mar 27, 2020 · 2 comments · Fixed by #15

Comments

@DomenicP
Copy link
Contributor

When trying to run colcon lcov-result on a fresh install, I'm receiving the following error:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/colcon_core/executor/__init__.py", line 91, in __call__
    rc = await self.task(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/colcon_core/task/__init__.py", line 92, in __call__
    return await task_method(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/colcon_lcov_result/task/lcov.py", line 63, in lcov_capture
    '--base-directory', str(pkg.realpath),
AttributeError: 'PackageDescriptor' object has no attribute 'realpath'

After doing a little digging, it looks like changes in the most recent version of colcon-core (0.5.5) may have broken colcon-lcov-result. It looks like PackageDescriptor#realpath may have been removed in colcon/colcon-core#311? I'm going to try downgrading colcon-core to see if that temporarily solves the problem.

Environment:

$ uname -a
Linux 0792e66080d7 4.19.76-linuxkit #1 SMP Thu Oct 17 19:31:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

$ python3 --version
Python 3.6.9

$ env | grep ROS
ROS_VERSION=2
ROS_PYTHON_VERSION=3
ROS_DISTRO=dashing

$ pip3 freeze | grep colcon
colcon-argcomplete==0.3.3
colcon-bash==0.4.2
colcon-cd==0.1.1
colcon-cmake==0.2.19
colcon-common-extensions==0.2.1
colcon-core==0.5.5
colcon-defaults==0.2.4
colcon-devtools==0.2.2
colcon-lcov-result==0.3.0
colcon-library-path==0.2.1
colcon-metadata==0.2.4
colcon-mixin==0.1.6
colcon-notification==0.2.12
colcon-output==0.2.8
colcon-package-information==0.3.2
colcon-package-selection==0.2.5
colcon-parallel-executor==0.2.4
colcon-pkg-config==0.1.0
colcon-powershell==0.3.6
colcon-python-setup-py==0.2.5
colcon-recursive-crawl==0.2.1
colcon-ros==0.3.17
colcon-test-result==0.3.8
colcon-zsh==0.4.0
@DomenicP
Copy link
Contributor Author

I was able to fix this in https://github.com/DomenicP/colcon-lcov-result/commit/08d6f501a2738dbe85ecea569d63d81ebcdeefa9. If this solution is correct, then I'd be glad to open up a pull request.

@jpsamper2009
Copy link
Collaborator

jpsamper2009 commented Mar 27, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants