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

Could not work with pyton-dotenv>=0.19.0 #34

Closed
davidlatwe opened this issue Oct 15, 2021 · 0 comments · Fixed by #35 or #36
Closed

Could not work with pyton-dotenv>=0.19.0 #34

davidlatwe opened this issue Oct 15, 2021 · 0 comments · Fixed by #35 or #36
Labels
bug Something isn't working

Comments

@davidlatwe
Copy link
Owner

If recipe rezup.toml has section env, rezup could not use container due to some change made in pyton-dotenv-0.19.0

C:\Users\david>rezup
Traceback (most recent call last):
  File "c:\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python37\Scripts\rezup.exe\__main__.py", line 7, in <module>
  File "c:\users\david\dev\rezup\src\rezup\cli.py", line 100, in run
    cmd_use(opts.name, job=opts.do)
  File "c:\users\david\dev\rezup\src\rezup\cli.py", line 118, in cmd_use
    revision.use(run_script=job)
  File "c:\users\david\dev\rezup\src\rezup\container.py", line 420, in use
    environment = self._compose_env()
  File "c:\users\david\dev\rezup\src\rezup\container.py", line 462, in _compose_env
    env.update(self.recipe_env() or {})
  File "c:\users\david\dev\rezup\src\rezup\container.py", line 350, in recipe_env
    recipe_env_dict = dotenv_values(buffer)  # noqa
  File "c:\python37\lib\site-packages\dotenv\main.py", line 359, in dotenv_values
    encoding=encoding,
  File "c:\python37\lib\site-packages\dotenv\main.py", line 74, in dict
    self._dict = OrderedDict(resolve_variables(raw_values, override=self.override))
  File "c:\python37\lib\site-packages\dotenv\main.py", line 218, in resolve_variables
    for (name, value) in values:
  File "c:\python37\lib\site-packages\dotenv\main.py", line 81, in parse
    with self._get_stream() as stream:
  File "c:\python37\lib\contextlib.py", line 112, in __enter__
    return next(self.gen)
  File "c:\python37\lib\site-packages\dotenv\main.py", line 53, in _get_stream
    if self.dotenv_path and os.path.isfile(self.dotenv_path):
  File "c:\python37\lib\genericpath.py", line 30, in isfile
    st = os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not _io.StringIO
@davidlatwe davidlatwe added the bug Something isn't working label Oct 15, 2021
@davidlatwe davidlatwe mentioned this issue Oct 15, 2021
davidlatwe added a commit that referenced this issue Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant