Project

General

Profile

Actions

Bug #18835

closed

[a-c-r] name 'file' is not defined (Python 3)

Added by Ward Vandewege 11 months ago. Updated 9 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
04/26/2022
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
-
Release relationship:
Auto

Description

$ arvados-cwl-runner --debug xxxx1-7fd4e-redactedredacte --fasta_file keep/shared/redact\ redacte/redactedred/reda\ redactedre\ r/test_fasta.fa --stdout_name "test1" 

INFO /usr/bin/arvados-cwl-runner 2.3.2, arvados-python-client 2.3.2, cwltool 3.1.20211107152837
INFO Resolved 'xxxx1-7fd4e-REDACTEDREDACTE' to 'arvwf:xxxx1-7fd4e-REDACTEDREDACTE#main'
DEBUG Parsed job order from command line: {
    "id": "xxxx1-7fd4e-REDACTEDREDACTE",
    "fasta_file": {
        "class": "File",
        "location": "file:///home/redacted/keep/shared/redact%20redacte/redactedred/reda%20redactedre%20r/test_fasta.fa" 
    },
    "stdout_name": "test1" 
}
INFO Using cluster xxxx1 (https://workbench2.xxxx1.redactedredacted.redacted/)
ERROR Unhandled error:
  name 'file' is not defined
Traceback (most recent call last):
  File "/usr/share/python3/dist/python3-arvados-cwl-runner/lib/python3.8/site-packages/cwltool/main.py", line 1302, in main
    (out, status) = real_executor(
  File "/usr/share/python3/dist/python3-arvados-cwl-runner/lib/python3.8/site-packages/arvados_cwl/executor.py", line 564, in arv_executor
    job_order = upload_job_order(self, "%s input" % runtimeContext.name,
  File "/usr/share/python3/dist/python3-arvados-cwl-runner/lib/python3.8/site-packages/arvados_cwl/runner.py", line 557, in upload_job_order
    jobmapper = upload_dependencies(arvrunner,
  File "/usr/share/python3/dist/python3-arvados-cwl-runner/lib/python3.8/site-packages/arvados_cwl/runner.py", line 395, in upload_dependencies
    mapper = ArvPathMapper(arvrunner, sc, "",
  File "/usr/share/python3/dist/python3-arvados-cwl-runner/lib/python3.8/site-packages/arvados_cwl/pathmapper.py", line 64, in __init__
    super(ArvPathMapper, self).__init__(referenced_files, input_basedir, None)
  File "/usr/share/python3/dist/python3-arvados-cwl-runner/lib/python3.8/site-packages/cwltool/pathmapper.py", line 70, in __init__
    self.setup(dedup(referenced_files), basedir)
  File "/usr/share/python3/dist/python3-arvados-cwl-runner/lib/python3.8/site-packages/arvados_cwl/pathmapper.py", line 184, in setup
    self.visit(srcobj, uploadfiles)
  File "/usr/share/python3/dist/python3-arvados-cwl-runner/lib/python3.8/site-packages/arvados_cwl/pathmapper.py", line 87, in visit
    st = arvados.commands.run.statfile("", ab,
  File "/usr/share/python3/dist/python3-arvados-cwl-runner/lib/python3.8/site-packages/arvados/commands/run.py", line 108, in statfile
    (pdh, branch) = is_in_collection(sp[0], sp[1])
  File "/usr/share/python3/dist/python3-arvados-cwl-runner/lib/python3.8/site-packages/arvados/commands/run.py", line 68, in is_in_collection
    with file(fn, 'r') as f:
NameError: name 'file' is not defined

Subtasks 1 (0 open1 closed)

Task #18836: Write test caseResolvedPeter Amstutz04/26/2022

Actions
Actions #1

Updated by Ward Vandewege 11 months ago

  • Description updated (diff)
Actions #2

Updated by Ward Vandewege 11 months ago

  • Release set to 49
Actions #3

Updated by Peter Amstutz 11 months ago

  • Assigned To set to Peter Amstutz
Actions #4

Updated by Peter Amstutz 11 months ago

  • Status changed from New to In Progress
Actions #5

Updated by Peter Amstutz 11 months ago

I committed the one-line fix in a4e945b6d279443e53af95cdf806a1c1339a76b8

Keeping the issue open as a reminder to write a test for it.

Actions #6

Updated by Peter Amstutz 11 months ago

  • Target version changed from 2022-03-16 sprint to 2022-03-30 Sprint
Actions #7

Updated by Peter Amstutz 10 months ago

  • Target version changed from 2022-03-30 Sprint to 2022-04-13 Sprint
Actions #8

Updated by Peter Amstutz 10 months ago

  • Target version changed from 2022-04-13 Sprint to 2022-04-27 Sprint
Actions #10

Updated by Peter Amstutz 9 months ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF