Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typo in variable name (long-description) that prevents use of putup --dsproject #20

Closed
chuaxr opened this issue Mar 21, 2021 · 1 comment

Comments

@chuaxr
Copy link

chuaxr commented Mar 21, 2021

Description of your problem

Please provide a minimal, self-contained, and reproducible example.

putup --dsproject test_proj

Please provide the full traceback.

Traceback (most recent call last):
  File "/home/xr/miniconda3/envs/scaftest/bin/putup", line 10, in <module>
    sys.exit(run())
  File "/home/xr/miniconda3/envs/scaftest/lib/python3.9/site-packages/pyscaffold/shell.py", line 94, in func_wrapper
    func(*args, **kwargs)
  File "/home/xr/miniconda3/envs/scaftest/lib/python3.9/site-packages/pyscaffold/exceptions.py", line 33, in func_wrapper
    func(*args, **kwargs)
  File "/home/xr/miniconda3/envs/scaftest/lib/python3.9/site-packages/pyscaffold/cli.py", line 263, in run
    main(args or sys.argv[1:])
  File "/home/xr/miniconda3/envs/scaftest/lib/python3.9/site-packages/pyscaffold/cli.py", line 256, in main
    opts["command"](opts)
  File "/home/xr/miniconda3/envs/scaftest/lib/python3.9/site-packages/pyscaffold/cli.py", line 225, in run_scaffold
    api.create_project(opts)
  File "/home/xr/miniconda3/envs/scaftest/lib/python3.9/site-packages/pyscaffold/api.py", line 156, in create_project
    return reduce(actions.invoke, pipeline, ({}, opts))
  File "/home/xr/miniconda3/envs/scaftest/lib/python3.9/site-packages/pyscaffold/actions.py", line 98, in invoke
    return action(*struct_and_opts)
  File "/home/xr/miniconda3/envs/scaftest/lib/python3.9/site-packages/pyscaffoldext/markdown/extension.py", line 122, in replace_files
    struct["setup.cfg"] = (add_long_desc(content), file_op)
  File "/home/xr/miniconda3/envs/scaftest/lib/python3.9/site-packages/pyscaffoldext/markdown/extension.py", line 41, in add_long_desc
    metadata["long-description"].value = "file: README.md"
  File "/home/xr/miniconda3/envs/scaftest/lib/python3.9/site-packages/configupdater/configupdater.py", line 298, in __getitem__
    raise KeyError(key)
KeyError: 'long-description'

Changing long-description to long_description in markdown/extension.py removed the error.

Versions and main components

  • PyScaffold Version: 4.0.1
  • Python Version: 3.9
  • Operating system: Linux
  • How did you install PyScaffold: conda
@FlorianWilhelm
Copy link
Member

Thanks, @chuaxr for posting this issue. It was not really a typo but more of a problem that there was a change in setup.cfg regarding the usage of dashes that was fixed in PyScaffold 4.0.1. @abravalheri had already fixed this in the markdown extension but I forgot to merge his PR, sorry for the inconvenience.

Now everything should work fine for you. Just reinstall the latest version 0.6.1 of this extension. This should automatically also update the markdown extension to 0.4.1 and PyScaffold itself to 4.0.1.

If everything works for you please close this issue. Thank you :-)

@chuaxr chuaxr closed this as completed Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants