Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console: run_script_once is broken #1418

Closed
mhils opened this issue Jul 23, 2016 · 1 comment
Closed

console: run_script_once is broken #1418

mhils opened this issue Jul 23, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@mhils
Copy link
Member

mhils commented Jul 23, 2016

Steps to reproduce the problem:
  1. mitmproxy
  2. n g enter
  3. | script.py
What is the expected behavior?

No crash.

What went wrong?
user@user-ubuntu:~$ mitmproxy
Traceback (most recent call last):
  File "/media/sf_git/mitmproxy/mitmproxy/console/master.py", line 317, in run_script_once
    s = script.Script(command)
AttributeError: module 'mitmproxy.script' has no attribute 'Script'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/media/sf_git/mitmproxy/mitmproxy/console/master.py", line 498, in run
    self.loop.run()
  File "/usr/local/lib/python3.5/dist-packages/urwid/main_loop.py", line 278, in run
    self._run()
  File "/usr/local/lib/python3.5/dist-packages/urwid/main_loop.py", line 376, in _run
    self.event_loop.run()
  File "/usr/local/lib/python3.5/dist-packages/urwid/main_loop.py", line 682, in run
    self._loop()
  File "/usr/local/lib/python3.5/dist-packages/urwid/main_loop.py", line 719, in _loop
    self._watch_files[fd]()
  File "/usr/local/lib/python3.5/dist-packages/urwid/raw_display.py", line 393, in <lambda>
    event_loop, callback, self.get_available_raw_input())
  File "/usr/local/lib/python3.5/dist-packages/urwid/raw_display.py", line 493, in parse_input
    callback(processed, processed_codes)
  File "/usr/local/lib/python3.5/dist-packages/urwid/main_loop.py", line 403, in _update
    self.process_input(keys)
  File "/usr/local/lib/python3.5/dist-packages/urwid/main_loop.py", line 503, in process_input
    k = self._topmost_widget.keypress(self.screen_size, k)
  File "/media/sf_git/mitmproxy/mitmproxy/console/window.py", line 42, in keypress
    k = super(self.__class__, self).keypress(size, k)
  File "/usr/local/lib/python3.5/dist-packages/urwid/container.py", line 1116, in keypress
    return self.footer.keypress((maxcol,),key)
  File "/media/sf_git/mitmproxy/mitmproxy/console/statusbar.py", line 134, in keypress
    return self.master.ab.keypress(*args, **kwargs)
  File "/media/sf_git/mitmproxy/mitmproxy/console/statusbar.py", line 89, in keypress
    self.prompt_execute(self._w.get_edit_text())
  File "/media/sf_git/mitmproxy/mitmproxy/console/statusbar.py", line 112, in prompt_execute
    msg = p(txt, *args)
  File "/media/sf_git/mitmproxy/mitmproxy/console/master.py", line 319, in run_script_once
    except script.ScriptException as e:
AttributeError: module 'mitmproxy.script' has no attribute 'ScriptException'

Mitmproxy Version: master
Operating System: Ubuntu 14.04 x64

@mhils mhils added the kind/bug label Jul 23, 2016
@dufferzafar dufferzafar added this to the gsoc-core-features milestone Jul 24, 2016
@dufferzafar
Copy link
Contributor

dufferzafar commented Jul 25, 2016

The main reason this is happening is because mitmproxy.script should now be mitmproxy.builtins.script due to changes made in #1356

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants