TypeError: glib.spawn_async: second argument must be a sequence of strings

Bug #1318762 reported by harum
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
kupfer
New
Undecided
Unassigned

Bug Description

Hi

I am trying to pass some arguments to bash scripts/executables in text mode and this is the error I am getting.

Traceback (most recent call last):
  File "/usr/share/kupfer/kupfer/ui/browser.py", line 1615, in _activate
    self.data_controller.activate(ui_ctx=self._make_gui_ctx())
  File "/usr/share/kupfer/kupfer/core/data.py", line 800, in activate
    res, ret = ctx.run(leaf, action, sobject, ui_ctx=ui_ctx)
  File "/usr/share/kupfer/kupfer/core/commandexec.py", line 303, in run
    ret = activate_action(execution_token, obj, action, iobj)
  File "/usr/share/kupfer/kupfer/core/commandexec.py", line 80, in activate_action
    return _activate_action_single(obj, action, iobj, kwargs)
  File "/usr/share/kupfer/kupfer/core/commandexec.py", line 86, in _activate_action_single
    ret = action.activate(obj, iobj, **kwargs)
  File "/usr/share/kupfer/kupfer/plugin/commands.py", line 131, in activate
    utils.AsyncCommand(argv, finish_callback, None, stdin=leaf.object)
  File "/usr/share/kupfer/kupfer/utils.py", line 126, in __init__
    standard_error=True, flags=flags, envp=env)
TypeError: glib.spawn_async: second argument must be a sequence of strings

I am on Debian Jessie using Python 2.7.

thanks

Revision history for this message
Hugo Ribeiro (hugosenari) wrote :

I looked at code and best anwser I found is this:
http://stackoverflow.com/questions/21792231/within-python-what-is-exactly-a-sequence-of-strings-or-else-glib-bug

Then my workaround:
https://github.com/hugosenari/kupfer/commit/12653d3ac2addf3ef682d1cf1e08b641729b5abf

But this let me with another bug that I don't know if come from these changes or not:
When you pass a string to gedit (wih pass to command), kupfer exit when gedit close.

To test my version change your:
/usr/share/kupfer/kupfer/utils.py
With:
https://raw.githubusercontent.com/hugosenari/kupfer/12653d3ac2addf3ef682d1cf1e08b641729b5abf/kupfer/utils.py ( https://github.com/hugosenari/kupfer/blob/12653d3ac2addf3ef682d1cf1e08b641729b5abf/kupfer/utils.py )

Revision history for this message
Karol Będkowski (karol-bedkowski) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.