-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
When I run nxid in a Python 3 environment on an item that already has an ARK, I'm getting the following error:
(Expected output is ℹ noop update)
File "/home/noah/miniconda3/bin/nxid", line 10, in <module>
sys.exit(main())
File "/home/noah/miniconda3/lib/python3.7/site-packages/pynux/nxid.py", line 155, in main
print('ℹ noop update "{}" {} {}'.format(path, ark, owner))
ValueError: underlying buffer has been detached
Exception ignored in: <_io.TextIOWrapper mode='w' encoding='UTF-8'>
ValueError: underlying buffer has been detached
It looks like this may have to do with the stdout stuff in the check_ezid function that gets called if ARK is not none:
Lines 167 to 175 in 92f813f
| def check_ezid(ark, ezid): | |
| ''' check to see if the ARK is listed in EZID, returns raw ERC or `None`''' | |
| try: | |
| sys.stdout = open(os.devnull, 'w') | |
| return ezid.view(ark) | |
| except HTTPError: | |
| return None | |
| finally: | |
| sys.stdout = sys.__stdout__ |
This doesn't affect the ability to mint new ARKs for items with no ARK, which is my main day to day use case, so it's not a big priority on my end.
Metadata
Metadata
Assignees
Labels
No labels