Bug 261211 - textproc/json2yaml: python3.7 doesn't appear to be supported
Summary: textproc/json2yaml: python3.7 doesn't appear to be supported
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-14 21:18 UTC by Chris Hutchinson
Modified: 2022-01-14 23:27 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Hutchinson 2022-01-14 21:18:13 UTC
This port purports to convert json to yaml | yaml to json.
Attempting to convert a valid YAML file to JSON returns:

# json2yaml a-root.yml a-root.json
Traceback (most recent call last):
  File "/usr/local/bin/json2yaml", line 62, in <module>
    convert(json_file, yaml_file)
  File "/usr/local/bin/json2yaml", line 48, in convert
    loaded_json = json.load(json_file, object_pairs_hook=collections.OrderedDict)
  File "/usr/local/lib/python3.7/json/__init__.py", line 296, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/usr/local/lib/python3.7/json/__init__.py", line 361, in loads
    return cls(**kw).decode(s)
  File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

As you can see I'm on python3.7. But the Makefile reports:
USES=		python:3.6+

The resultant .json file is 0 bytes in length.
Any help greatly appreciated.

Thanks.
Comment 1 Chris Hutchinson 2022-01-14 22:03:21 UTC
Apologies. My mistake.
In my haste to use this I didn't notice there
were 2 different programs. Rather than one program
with 2 different options.

Sorry for the noise.