squaresLab / BugZoo

Keep your bugs contained. A platform for studying historical software bugs.
https://squareslab.github.io/BugZoo
MIT License
67 stars 12 forks source link

Python bugs are not supported #238

Closed git-afsantos closed 4 years ago

git-afsantos commented 6 years ago

When trying to build a .bugzoo.yml file for a bug with language python (or py), and then running bugzoo source update, the command fails.

No errors are printed to the console, but the log file contains the following error.

ERROR:bugzoo.mgr.source:2018-07-05 15:41:28,390: missing property in bug description: 'PYTHON'
Traceback (most recent call last):
  File "/home/andre/robust/lib/python3.5/site-packages/bugzoo/mgr/source.py", line 211, in __parse_file
    bug = self.__parse_bug(source, fn, description)
  File "/home/andre/robust/lib/python3.5/site-packages/bugzoo/mgr/source.py", line 183, in __parse_bug
    [Language[lang] for lang in d['languages']],
  File "/home/andre/robust/lib/python3.5/site-packages/bugzoo/mgr/source.py", line 183, in <listcomp>
    [Language[lang] for lang in d['languages']],
  File "/home/andre/robust/lib/python3.5/site-packages/bugzoo/core/language.py", line 6, in __getitem__
    return super().__getitem__(name.upper())
  File "/usr/lib/python3.5/enum.py", line 277, in __getitem__
    return cls._member_map_[name]
KeyError: 'PYTHON'

Is it safe to use cpp as a workaround, or does it influence the outcome?

git-afsantos commented 6 years ago

For reference, the problematic bug is robust:5ee65b0.

ChrisTimperley commented 6 years ago

It's fine to use cpp as a workaround for now. The only area where language has any influence is on the generation of coverage information, which isn't currently supported for Python programs. I'll get BugZoo to report a reasonable error message to the terminal. Do you mind sharing the complete command that you passed to BugZoo so that I can quickly test a fix? :)

git-afsantos commented 6 years ago

It's fine to use cpp as a workaround for now.

Alright. Will try that.

I just ran bugzoo source update, after having already a local repository registered as a source.

git-afsantos commented 6 years ago

And here is the manifest I was trying to add, if it matters.

version: '1.0'

blueprints:
  - type: docker
    tag: robustrosin/robust:5ee65b0
    file: ../../Dockerfile
    arguments:
      IS_BUILD_FAILURE: "no"
      USE_APT_OLD_RELEASES: "no"
      UBUNTU_VERSION: trusty
      ROS_DISTRO: indigo
      CATKIN_PKG: kobuki_dashboard
      REPO_FORK_URL: https://github.com/robust-rosin/kobuki_desktop
      REPO_BUG_COMMIT: 37a1eee5ce2642144735102ffcd4c3736c4b2850
      REPO_FIX_COMMIT: d852bd6dbc24c7096bd6f042739725b894359494

bugs:
  - name: robust:5ee65b0
    image: robustrosin/robust:5ee65b0
    program: kobuki_dashboard
    dataset: robust
    languages:
      - python
    source-location: /ros_ws/src
    test-harness:
      type: empty
    compiler:
      type: catkin
      workspace: /ros_ws/src
      time-limit: 300