Skip to content

Error producing error message when reference bin file not found #4

@dfornika

Description

@dfornika

Tool fails with message:

Traceback (most recent call last):
  File "/opt/production_galaxy/var/shed_tools/toolshed.g2.bx.psu.edu/repos/damion/blast_reporting/812de0e282bd/blast_reporting/blast_reporting.py", line 627, in <module>
    reportEngine.__main__()
  File "/opt/production_galaxy/var/shed_tools/toolshed.g2.bx.psu.edu/repos/damion/blast_reporting/812de0e282bd/blast_reporting/blast_reporting.py", line 502, in __main__
    tagGroup = XMLRecordScan(options, output_format)
  File "/opt/production_galaxy/var/shed_tools/toolshed.g2.bx.psu.edu/repos/damion/blast_reporting/812de0e282bd/blast_reporting/blast_reporting.py", line 220, in __init__
    self.binManager.build_bins(options.reference_bins, self.columns)
  File "/opt/production_galaxy/var/shed_tools/toolshed.g2.bx.psu.edu/repos/damion/blast_reporting/812de0e282bd/blast_reporting/reference_bins.py", line 48, in build_bins
    newbin = self.buildBin(field_name, bin_filter)
  File "/opt/production_galaxy/var/shed_tools/toolshed.g2.bx.psu.edu/repos/damion/blast_reporting/812de0e282bd/blast_reporting/reference_bins.py", line 93, in buildBin
    stop_err("Reference bin could not be found or opened: " + self.path + bin_folder_name + '/accession_ids.tab')
NameError: global name 'stop_err' is not defined

Other references to stop_err are prefixed by the module name common:

common.stop_err("Invalid bin name: " + field_name + ':' + myfield)

If stop_err is replaced with common.stop_err on reference_bins.py line 93 then this error is produced:

Traceback (most recent call last):
  File "/opt/production_galaxy/var/shed_tools/toolshed.g2.bx.psu.edu/repos/damion/blast_reporting/812de0e282bd/blast_reporting/blast_reporting.py", line 627, in <module>
    reportEngine.__main__()
  File "/opt/production_galaxy/var/shed_tools/toolshed.g2.bx.psu.edu/repos/damion/blast_reporting/812de0e282bd/blast_reporting/blast_reporting.py", line 502, in __main__
    tagGroup = XMLRecordScan(options, output_format)
  File "/opt/production_galaxy/var/shed_tools/toolshed.g2.bx.psu.edu/repos/damion/blast_reporting/812de0e282bd/blast_reporting/blast_reporting.py", line 220, in __init__
    self.binManager.build_bins(options.reference_bins, self.columns)
  File "/opt/production_galaxy/var/shed_tools/toolshed.g2.bx.psu.edu/repos/damion/blast_reporting/812de0e282bd/blast_reporting/reference_bins.py", line 48, in build_bins
    newbin = self.buildBin(field_name, bin_filter)
  File "/opt/production_galaxy/var/shed_tools/toolshed.g2.bx.psu.edu/repos/damion/blast_reporting/812de0e282bd/blast_reporting/reference_bins.py", line 93, in buildBin
    common.stop_err("Reference bin could not be found or opened: " + self.path + bin_folder_name + '/accession_ids.tab')
AttributeError: ReferenceBins instance has no attribute 'path'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions