While trying to use the rdepends command with a package, it was not working as expected, giving the following output.
test@0c7b0c66ecd8:~/dev$ npm2deb rdepends pretty-ms
Traceback (most recent call last):
File "/usr/bin/npm2deb", line 7, in <module>
sys.exit(main(sys.argv))
File "/usr/lib/python3/dist-packages/npm2deb/scripts.py", line 157, in main
args.func(args)
File "/usr/lib/python3/dist-packages/npm2deb/scripts.py", line 284, in show_reverse_dependencies
_helper.search_for_reverse_dependencies(node_module)
File "/usr/lib/python3/dist-packages/npm2deb/helper.py", line 88, in search_for_reverse_dependencies
data = _urlopen(url).read().decode('utf-8')
File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.6/urllib/request.py", line 570, in error
return self._call_chain(*args)
File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib/python3.6/urllib/request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
I further tried to debug the issue by printing the various headers/urls being passed within the traceback and I got this
https://github.com/LeoIannacone/npm2deb/blob/97a4992f4d426a8f04412d85cfa3351fb69bf493/npm2deb/helper.py#L84
While trying to use the
rdepends
command with a package, it was not working as expected, giving the following output.I further tried to debug the issue by printing the various headers/urls being passed within the traceback and I got this
so I tried to report a bug for this which brought me to the already reported bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=905944
So the patch mentioned in the bug above actually makes it work.
I am going to send the PR with the patch next.