asdf-format / asdf

ASDF (Advanced Scientific Data Format) is a next generation interchange format for scientific data

Home Page:http://asdf.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`asdf.util.filepath_to_url` does not accept `Path` instances

braingram opened this issue · comments

Description of the problem

asdf.util.filepath_to_url raises an exception when provided with a pathlib.Path instance.

Example of the problem

import asdf, pathlib

p = pathlib.Path('foo')
asdf.util.filepath_to_url(p)  # raises TypeError: quote_from_bytes() expected bytes

System information

asdf version: main
python version: 3.10
operating system: mac osx