Skip to content

TypeError with Form Login Plugin #1344

@cryptelli

Description

@cryptelli

Expected behaviour:

Task runs without generating error.

Actual behaviour:

Task runs and generates the following error

TypeError: must be unicode, not str

Steps to reproduce:

  • Step 1: Install latest version of Flexget using virtualenv
  • Step 2: pip install mechanize
  • Step 3: Create config.yml
  • Step 4: flexget --test execute

Config:

tasks:
  test task:
    form:
      url: http://example.com/login.php
      username: email address
      password: password
    html:
      url: http://example.com/

Log:

Crash:

2016-08-16 11:40 DEBUG    manager       test task       Traceback:
Traceback (most recent call last):
  File "/home/username/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 444, in __run_plugin
    return method(*args, **kwargs)
  File "/home/username/flexget/local/lib/python2.7/site-packages/flexget/event.py", line 23, in __call__
    return self.func(*args, **kwargs)
  File "/home/username/flexget/local/lib/python2.7/site-packages/flexget/plugins/plugin_formlogin.py", line 73, in on_task_start
    f.write(br.response().get_data())
TypeError: must be unicode, not str
2016-08-16 11:40 WARNING  task          test task       Aborting task (plugin: form)
2016-08-16 11:40 DEBUG    task_queue                    task test task aborted: TaskAbort(reason=BUG: Unhandled error in plugin form: must be unicode, not str, silent=False)

Full log.

http://pastebin.com/yBRqhYjR

Additional information:

  • Flexget Version: 2.2.20
  • Python Version: 2.7.9
  • Installation method: Virtualenv
  • OS and version: Debian 8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions