szk2s/spectrum2mpe

ValueError: too many values to unpack (expected 2)

Closed this issue · 1 comments

szk2s commented

Issue tracker is ONLY used for reporting bugs. NO NEW FEATURE ACCEPTED! Use stackoverflow for supporting issues.

Expected Behavior

Pythonでスペクトログラムを表示したい。

Current Behavior

Traceback (most recent call last):
  File "/Users/satoshisuzuki/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/experimental/ptvsd_launcher.py", line 45, in <module>
    main(ptvsdArgs)
  File "/Users/satoshisuzuki/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/experimental/ptvsd/ptvsd/__main__.py", line 265, in main
    wait=args.wait)
  File "/Users/satoshisuzuki/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/experimental/ptvsd/ptvsd/__main__.py", line 258, in handle_args
    debug_main(addr, name, kind, *extra, **kwargs)
  File "/Users/satoshisuzuki/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/experimental/ptvsd/ptvsd/_local.py", line 45, in debug_main
    run_file(address, name, *extra, **kwargs)
  File "/Users/satoshisuzuki/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/experimental/ptvsd/ptvsd/_local.py", line 79, in run_file
    run(argv, addr, **kwargs)
  File "/Users/satoshisuzuki/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/experimental/ptvsd/ptvsd/_local.py", line 140, in _run
    _pydevd.main()
  File "/Users/satoshisuzuki/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/experimental/ptvsd/ptvsd/_vendored/pydevd/pydevd.py", line 1925, in main
    debugger.connect(host, port)
  File "/Users/satoshisuzuki/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/experimental/ptvsd/ptvsd/_vendored/pydevd/pydevd.py", line 1283, in run
    return self._exec(is_module, entry_point_fn, module_name, file, globals, locals)
  File "/Users/satoshisuzuki/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/experimental/ptvsd/ptvsd/_vendored/pydevd/pydevd.py", line 1290, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "/Users/satoshisuzuki/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/experimental/ptvsd/ptvsd/_vendored/pydevd/_pydev_imps/_pydev_execfile.py", line 25, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/Users/satoshisuzuki/git/spectrum2mpe/analyser.py", line 12, in <module>
    plt.pcolormesh(t, f, Sxx)
  File "/anaconda3/lib/python3.6/site-packages/matplotlib/pyplot.py", line 3288, in pcolormesh
    ret = ax.pcolormesh(*args, **kwargs)
  File "/anaconda3/lib/python3.6/site-packages/matplotlib/__init__.py", line 1855, in inner
    return func(ax, *args, **kwargs)
  File "/anaconda3/lib/python3.6/site-packages/matplotlib/axes/_axes.py", line 5930, in pcolormesh
    X, Y, C = self._pcolorargs('pcolormesh', *args, allmatch=allmatch)
  File "/anaconda3/lib/python3.6/site-packages/matplotlib/axes/_axes.py", line 5550, in _pcolorargs
    numRows, numCols = C.shape
ValueError: too many values to unpack (expected 2)
Terminated: 15

Possible Solution

Steps to Reproduce

  1. git checkout dev/py-analyser
  2. python analyser.py

Context (Environment)

Detailed Description

Possible Implementation

szk2s commented

resolved by adding summing to mono process