Package: pypi2deb Version: 4.20240727 Severity: normal File: /usr/share/pypi2deb/pypi2deb/github.py Usertags: crash
When I try to package a Python module that has no GitHub releases/tags, py2dsp crashes because it can't find a version. I was able to get a PyEtherpadLite binary package using these steps: * hack the py2dsp code to set the version to master * hack the py2dsp code to use the branch tarball * rename the tarball to lower-case * build the source package * build the binary package with nocheck The original crash looked like this: $ py2dsp --github https://github.com/guyzmo/PyEtherpadLite -v D: py2dsp py2dsp:163: version: 4.20240727 D: py2dsp py2dsp:164: ['/usr/bin/py2dsp', '--github', 'https://github.com/guyzmo/PyEtherpadLite', '-v'] D: py2dsp py2dsp:44: args: Namespace(verbose=True, quiet=False, root='/home/pabs/result', clean=False, build=False, application=False, profile=None, github='https://github.com/guyzmo/PyEtherpadLite', pypi_search=None, distribution='UNRELEASED', revision='0~py2deb', message='converte0~py2deb', name='PyEtherpadLite') D: py2dsp py2dsp:73: Calling github_download with PyEtherpadLite, https://github.com/guyzmo/PyEtherpadLite, 1.2, /home/pabs/result D: py2dsp github:37: Calling github get_repo with arg guyzmo/PyEtherpadLite E: py2dsp py2dsp:173: list index out of range Traceback (most recent call last): File "/usr/share/pypi2deb/pypi2deb/github.py", line 44, in github_download tag_name = repo.get_latest_release().tag_name ~~~~~~~~~~~~~~~~~~~~~~~^^ File "/usr/lib/python3/dist-packages/github/Repository.py", line 3602, in get_latest_release headers, data = self._requester.requestJsonAndCheck("GET", f"{self.url}/releases/latest") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/github/Requester.py", line 624, in requestJsonAndCheck return self.__check( ~~~~~~~~~~~~^ *self.requestJson( ^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ ) ^ File "/usr/lib/python3/dist-packages/github/Requester.py", line 792, in __check raise self.createException(status, responseHeaders, data) github.GithubException.UnknownObjectException: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/releases/releases#get-the-latest-release", "status": "404"} During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/py2dsp", line 171, in <module> asyncio.run(main(args)) ~~~~~~~~~~~^^^^^^^^^^^^ File "/usr/lib/python3.13/asyncio/runners.py", line 195, in run return runner.run(main) ~~~~~~~~~~^^^^^^ File "/usr/lib/python3.13/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^ File "/usr/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete return future.result() ~~~~~~~~~~~~~^^ File "/usr/bin/py2dsp", line 74, in main fname = await github_download(name, args.github, version=version, destdir=args.root) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/pypi2deb/pypi2deb/github.py", line 47, in github_download tag_name = repo.get_tags()[0].name ~~~~~~~~~~~~~~~^^^ File "/usr/lib/python3/dist-packages/github/PaginatedList.py", line 77, in __getitem__ return self.__elements[index] ~~~~~~~~~~~~~~~^^^^^^^ IndexError: list index out of range -- System Information: Debian Release: forky/sid APT prefers testing-debug APT policy: (900, 'testing-debug'), (900, 'testing'), (800, 'unstable-debug'), (800, 'unstable'), (790, 'buildd-unstable'), (700, 'experimental-debug'), (700, 'experimental'), (690, 'buildd-experimental') Architecture: amd64 (x86_64) Kernel: Linux 6.16.5+deb14-amd64 (SMP w/4 CPU threads; PREEMPT) Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages pypi2deb depends on: ii build-essential 12.12 ii devscripts 2.25.19 ii dh-python 6.20250414 ii python3 3.13.5-1 ii python3-aiohttp 3.11.16-1 ii python3-debian 1.0.1 ii python3-github 2.6.1-1 ii python3-jinja2 3.1.6-1 ii python3-redis 6.1.0-2 Versions of packages pypi2deb recommends: ii python3-msgpack 1.0.3-3+b4 Versions of packages pypi2deb suggests: pn cython <none> ii cython3 3.0.11+dfsg-2+b1 ii python-all-dev 2.7.18-3 pn python-pytest <none> ii python-setuptools 44.1.1-1.2 ii python3-all-dev 3.13.5-1 ii python3-pytest 8.3.5-2 ii python3-setuptools 78.1.1-0.1 ii python3-sphinx 8.2.3-6 -- no debconf information -- bye, pabs https://wiki.debian.org/PaulWise
signature.asc
Description: This is a digitally signed message part

