Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

"TypeError: decode() takes no keyword arguments" on Python 2.6 #457

Closed
@andy-maier

Description

@andy-maier

The change in commit79c99c0 specifies theerrors argument ofdecode() as a keyword argument. Support for keyword arguments indecode() was added only in Python 2.7. This causes this code to raise:

TypeError: decode() takes no keyword arguments

on Python 2.6.

This occurs for example on line 2297 ofthis Travis run.

Specifying theerrors argument in thedecode() invocations ingit/objects/commit.py as a positional argument resolves this. For example, line 504 is currently:

parse_actor_and_date(author_line.decode(self.encoding, errors='replace'))

and should be, to resolve this:

parse_actor_and_date(author_line.decode(self.encoding, 'replace'))

This applies to the three places that were changed by commit79c99c0.
I verified that the proposed change works on Python 2.6, 2.7, 3.4, 3.5.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp