Skip to content

Commit

Permalink
[HOTFIX] ValueError: invalid literal for int
Browse files Browse the repository at this point in the history
Fixes a new bug in mriqc:

```
Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/plugins/multiproc.py", line 68, in run_node
    result['result'] = node.run(updatehash=updatehash)
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 487, in run
    result = self._run_interface(execute=True)
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 571, in _run_interface
    return self._run_command(execute)
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 650, in _run_command
    result = self._interface.run(cwd=outdir)
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/interfaces/base/core.py", line 516, in run
    runtime = self._run_interface(runtime)
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/interfaces/report_base.py", line 69, in _run_interface
    self._generate_report()
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/interfaces/report_base.py", line 166, in _generate_report
    out_file=self._out_report
  File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/viz/utils.py", line 398, in compose_view
    width = int(viewbox[2])
ValueError: invalid literal for int() with base 10: '1108.8'
```
  • Loading branch information
oesteban authored Mar 15, 2018
1 parent 27c10fa commit f89d3b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion niworkflows/viz/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def compose_view(bg_svgs, fg_svgs, ref=0, out_file='report.svg'):
# Query the size of each
sizes = []
for f in svgs:
viewbox = f.root.get("viewBox").split(" ")
viewbox = [float(v) for v in f.root.get("viewBox").split(" ")]
width = int(viewbox[2])
height = int(viewbox[3])
sizes.append((width, height))
Expand Down

0 comments on commit f89d3b9

Please sign in to comment.