audreyfeldroy / cookiecutter-pypackage

Cookiecutter template for a Python package.
BSD 3-Clause "New" or "Revised" License
4.17k stars 1.77k forks source link

Step8, bumpversion Error #419

Open cgDeepLearn opened 6 years ago

cgDeepLearn commented 6 years ago

Description

In Step8 Release On PypI ,when I run bumpversion patch,got Type Error

What I Did

bumpversion patch

Error traceback


Traceback (most recent call last):
  File "c:\users\cg\appdata\local\programs\python\python36\Lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\cg\appdata\local\programs\python\python36\Lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\cg\.virtualenvs\cookiecutter_pydemo-ScFY1_yn\Scripts\bumpversion.exe\__main__.py", line 9, in <module>
  File "c:\users\cg\.virtualenvs\cookiecutter_pydemo-scfy1_yn\lib\site-packages\bumpversion\__init__.py", line 994, in main
    vcs.commit(message=commit_message)
  File "c:\users\cg\.virtualenvs\cookiecutter_pydemo-scfy1_yn\lib\site-packages\bumpversion\__init__.py", line 73, in commit
    list(os.environ.items()) + [(b'HGENCODING', b'utf-8')]
  File "c:\users\cg\appdata\local\programs\python\python36\Lib\subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "c:\users\cg\appdata\local\programs\python\python36\Lib\subprocess.py", line 403, in run
    with Popen(*popenargs, **kwargs) as process:
  File "c:\users\cg\appdata\local\programs\python\python36\Lib\subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "c:\users\cg\appdata\local\programs\python\python36\Lib\subprocess.py", line 997, in _execute_child
    startupinfo)
TypeError: environment can only contain strings

more

and pyup.io,bumpversion python3 didnot pass

pydanny commented 6 years ago

I can't duplicate this error. What is the name of your virtualenv?

cgDeepLearn commented 6 years ago

@pydanny I used pipenv. And the virtualenv directory is c:\users\cg\.virtualenvs\cookiecutter_pydemo-scfy1_yn

monkeez commented 6 years ago

bumpversion has a number of bugs and hasn't been maintained for over 2 years, I think you've found one of those bugs. You should consider changing this cookiecutter to use the forked bump2version or another auto versioning tool.