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

cannot use tabs in extras file #370

Closed
ssube opened this issue May 1, 2023 · 0 comments
Closed

cannot use tabs in extras file #370

ssube opened this issue May 1, 2023 · 0 comments
Labels
scope/convert status/fixed issues that have been fixed and released type/bug broken features
Milestone

Comments

@ssube
Copy link
Owner

ssube commented May 1, 2023

Using a YAML parser for JSON was quick and easy, but the difference in whitespace requirements will be a nuisance:

[2023-05-01 16:38:17,199] ERROR: MainProcess MainThread onnx_web.server.load: error loading extras file
Traceback (most recent call last):
  File "onnx_web\server\load.py", line 165, in load_extras
  File "yaml\__init__.py", line 125, in safe_load
  File "yaml\__init__.py", line 81, in load
  File "yaml\constructor.py", line 49, in get_single_data
  File "yaml\composer.py", line 36, in get_single_node
  File "yaml\composer.py", line 55, in compose_document
  File "yaml\composer.py", line 84, in compose_node
  File "yaml\composer.py", line 133, in compose_mapping_node
  File "yaml\composer.py", line 82, in compose_node
  File "yaml\composer.py", line 110, in compose_sequence_node
  File "yaml\parser.py", line 98, in check_event
  File "yaml\parser.py", line 486, in parse_flow_sequence_entry
  File "yaml\scanner.py", line 116, in check_token
  File "yaml\scanner.py", line 258, in fetch_more_tokens
yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
  in "<unicode string>", line 18, column 1:
            {
    ^

Add a helper method to load .json files using a JSON parser and .yaml files using the YAML one.

@ssube ssube added this to the v0.10 milestone May 1, 2023
@ssube ssube added type/bug broken features scope/convert status/fixed issues that have been fixed and released labels May 1, 2023
@ssube ssube closed this as completed May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope/convert status/fixed issues that have been fixed and released type/bug broken features
Projects
None yet
Development

No branches or pull requests

1 participant