Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE] Inform user when no sdist package is available on PyPI

See original GitHub issue

Issue Description

Due to it first being reported as a bug, the original comment will be preserved below.

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I’m always frustrated when […]

Grayskull should not only fail if there is no sdist available on PyPI (Just a wheel, etc.) but also inform the user of it.

Describe the solution you’d like A clear and concise description of what you want to happen.

Instead of raising an error, a message should be printed like: No sdist package available to download on PyPI, please create the recipe manually (or something similar).

Describe alternatives you’ve considered A clear and concise description of any alternative solutions or features you’ve considered.

A better alternative would be, as outlined in #8, to fall back to using a GitHub URL.

Additional context Add any other context or screenshots about the feature request here.

Please see below

Original issue:

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Ran grayskull pypi arn --maintainers BastianZim -o /package --strict-conda-forge
  2. See error

Expected behavior A clear and concise description of what you expected to happen.

The template for the package should be created.

Outputs If applicable, add the output to help explain your problem.


#### Initializing recipe for arn (pypi) ####

Recovering metadata from pypi...
Traceback (most recent call last):
  File "/Users/username/opt/anaconda3/envs/grayskull/bin/grayskull", line 10, in <module>
  File "/Users/username/opt/anaconda3/envs/grayskull/lib/python3.9/site-packages/grayskull/", line 121, in main
    recipe = GrayskullFactory.create_recipe(
  File "/Users/username/opt/anaconda3/envs/grayskull/lib/python3.9/site-packages/grayskull/base/", line 22, in create_recipe
    return GrayskullFactory.REGISTERED_CLASS[repo_type.lower()](
  File "/Users/username/opt/anaconda3/envs/grayskull/lib/python3.9/site-packages/grayskull/pypi/", line 58, in __init__
    super(PyPi, self).__init__(name=name, version=str(version) if version else None)
  File "/Users/username/opt/anaconda3/envs/grayskull/lib/python3.9/site-packages/grayskull/base/", line 58, in __init__
  File "/Users/username/opt/anaconda3/envs/grayskull/lib/python3.9/site-packages/grayskull/base/", line 114, in update_all_recipe
  File "/Users/username/opt/anaconda3/envs/grayskull/lib/python3.9/site-packages/grayskull/pypi/", line 534, in refresh_section
    metadata = self._get_metadata()
  File "/Users/username/opt/anaconda3/envs/grayskull/lib/python3.9/site-packages/grayskull/pypi/", line 553, in _get_metadata
    pypi_metadata = self._get_pypi_metadata(name, version)
  File "/Users/username/opt/anaconda3/envs/grayskull/lib/python3.9/site-packages/grayskull/pypi/", line 713, in _get_pypi_metadata
    "sha256": PyPi.get_sha256_from_pypi_metadata(metadata),
  File "/Users/username/opt/anaconda3/envs/grayskull/lib/python3.9/site-packages/grayskull/pypi/", line 759, in get_sha256_from_pypi_metadata
    raise AttributeError(
AttributeError: Hash information for sdist was not found on PyPi metadata.


  • conda list:
# packages in environment at /Users/username/opt/anaconda3/envs/grayskull:
# Name                    Version                   Build  Channel
alabaster                 0.7.12                     py_0    conda-forge
babel                     2.9.0              pyhd3deb0d_0    conda-forge
brotlipy                  0.7.0           py39h66d5b7b_1001    conda-forge
c-ares                    1.17.1               hc929b4f_0    conda-forge
ca-certificates           2020.12.5            h033912b_0    conda-forge
certifi                   2020.12.5        py39h6e9494a_1    conda-forge
cffi                      1.14.4           py39h7786acb_1    conda-forge
chardet                   4.0.0            py39h6e9494a_1    conda-forge
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
cryptography              3.3.1            py39h79a2c39_1    conda-forge
curl                      7.71.1               hcb81553_8    conda-forge
docutils                  0.16             py39h6e9494a_3    conda-forge
expat                     2.2.9                hb1e8313_2    conda-forge
gettext                   h7937167_1005    conda-forge
git                       2.30.0          pl5320hd05cdc2_0    conda-forge
grayskull                 0.8.4              pyhd8ed1ab_0    conda-forge
idna                      2.10               pyh9f0ad1d_0    conda-forge
imagesize                 1.2.0                      py_0    conda-forge
jinja2                    2.11.2             pyh9f0ad1d_0    conda-forge
krb5                      1.17.2               h60d9502_0    conda-forge
libcurl                   7.71.1               h9bf37e3_8    conda-forge
libcxx                    11.0.0               h4c3b8ed_1    conda-forge
libedit                   3.1.20191231         h0678c8f_2    conda-forge
libev                     4.33                 haf1e3a3_1    conda-forge
libffi                    3.3                  h046ec9c_2    conda-forge
libiconv                  1.16                 haf1e3a3_0    conda-forge
libnghttp2                1.41.0               h7580e61_2    conda-forge
libssh2                   1.9.0                h8a08a2b_5    conda-forge
markupsafe                1.1.1            py39hcbf5805_3    conda-forge
ncurses                   6.2                  h2e338ed_4    conda-forge
openssl                   1.1.1i               h35c211d_0    conda-forge
packaging                 20.8               pyhd3deb0d_0    conda-forge
pcre                      8.44                 hb1e8313_0    conda-forge
perl                      5.32.0               hbcb3906_0    conda-forge
pip                       20.3.3             pyhd8ed1ab_0    conda-forge
progressbar2              3.53.1             pyh9f0ad1d_0    conda-forge
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pygments                  2.7.3              pyhd8ed1ab_0    conda-forge
pyopenssl                 20.0.1             pyhd8ed1ab_0    conda-forge
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pysocks                   1.7.1            py39h6e9494a_3    conda-forge
python                    3.9.1           h1d169a7_3_cpython    conda-forge
python-utils              2.4.0                      py_0    conda-forge
python_abi                3.9                      1_cp39    conda-forge
pytz                      2020.5             pyhd8ed1ab_0    conda-forge
rapidfuzz                 0.12.5           py39ha36be7a_0    conda-forge
readline                  8.0                  h0678c8f_2    conda-forge
requests                  2.25.1             pyhd3deb0d_0    conda-forge
ruamel.yaml               0.16.12          py39hcbf5805_2    conda-forge
ruamel.yaml.clib          0.2.2            py39hcbf5805_2    conda-forge
ruamel.yaml.jinja2        0.2.4                      py_1    conda-forge
setuptools                49.6.0           py39h6e9494a_3    conda-forge
six                       1.15.0             pyh9f0ad1d_0    conda-forge
snowballstemmer           2.0.0                      py_0    conda-forge
sphinx                    3.4.3              pyhd8ed1ab_0    conda-forge
sphinxcontrib-applehelp   1.0.2                      py_0    conda-forge
sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
sphinxcontrib-htmlhelp    1.0.3                      py_0    conda-forge
sphinxcontrib-jsmath      1.0.1                      py_0    conda-forge
sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
sphinxcontrib-serializinghtml 1.1.4                      py_0    conda-forge
sqlite                    3.34.0               h17101e1_0    conda-forge
stdlib-list               0.7.0                      py_2    conda-forge
tk                        8.6.10               h0419947_1    conda-forge
tzdata                    2020f                he74cb21_0    conda-forge
urllib3                   1.26.2             pyhd8ed1ab_0    conda-forge
wheel                     0.36.2             pyhd3deb0d_0    conda-forge
xz                        5.2.5                haf1e3a3_1    conda-forge
zlib                      1.2.11            h7795811_1010    conda-forge
  • pip list
Package                       Version
----------------------------- -------------------
alabaster                     0.7.12
Babel                         2.9.0
brotlipy                      0.7.0
certifi                       2020.12.5
cffi                          1.14.4
chardet                       4.0.0
colorama                      0.4.4
cryptography                  3.3.1
docutils                      0.16
grayskull                     0.8.4
idna                          2.10
imagesize                     1.2.0
Jinja2                        2.11.2
MarkupSafe                    1.1.1
packaging                     20.8
pip                           20.3.3
progressbar2                  3.53.1
pycparser                     2.20
Pygments                      2.7.3
pyOpenSSL                     20.0.1
pyparsing                     2.4.7
PySocks                       1.7.1
python-utils                  2.4.0
pytz                          2020.5
rapidfuzz                     0.12.5
requests                      2.25.1
ruamel.yaml                   0.16.12
ruamel.yaml.clib              0.2.2
ruamel.yaml.jinja2            0.2.4
setuptools                    49.6.0.post20210108
six                           1.15.0
snowballstemmer               2.0.0
Sphinx                        3.4.3
sphinxcontrib-applehelp       1.0.2
sphinxcontrib-devhelp         1.0.2
sphinxcontrib-htmlhelp        1.0.3
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.3
sphinxcontrib-serializinghtml 1.1.4
stdlib-list                   0.7.0
urllib3                       1.26.2
wheel                         0.36.2
  • grayskull --version

Additional context Add any other context about the problem here.

The package is which is on PyPi:

From what I can find, the download options do offer a hash but I’m not sure if that’s the one grayskull is talking about.


Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

BastianZimcommented, Jan 13, 2021

Updated everything! Feel free to ping me if you want me to clarify anything or add some more info! I couldn’t change the label though so would you mind doing that?

BastianZimcommented, Jan 13, 2021

Of course, will do, thanks for the reply!

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - pip install . creates only the dist-info not the package
Run pip uninstall -y pkgname && pip install -v . and check the build log whether the source files are processed (look for...
Read more >
Fail if PyPi package does not contain sdist · Issue #8 - GitHub
The new skeleton should fail if the package does not contain sdist on PyPi. We may try to get the source code from...
Read more >
Packaging and distributing projects
Packaging and distributing projects¶. This section covers some additional details on configuring, packaging and distributing Python projects with setuptools ...
Read more >
How to Publish an Open-Source Python Package to PyPI
Publishing your project is easier than it used to be. Yet, there are still a few steps involved. In this tutorial, you'll learn...
Read more >
How to Upload Your Python Package to PyPI and pip
How to make your Python package widely available on PyPI so others ... wish to use that particular functionality in their own application....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found