Skip to content

IsDir, IsFile and PathExists differ between Python 2.7 and Python 3.x #270

@svisser

Description

@svisser

In Python 2.7 the following calls:

  • Schema(IsDir())(3)
  • Schema(IsFile())(3)
  • Schema(PathExists())(3)

raise:

TypeError: coercing to Unicode: need string or buffer, int found

but in Python 3.x they respectively result in:

  • voluptuous.error.MultipleInvalid: not a directory
  • voluptuous.error.MultipleInvalid: not a file
  • voluptuous.error.MultipleInvalid: path does not exist

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions