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

TypeError: environment can only contain strings #189

Open
toukcrew opened this issue Nov 23, 2021 · 3 comments
Open

TypeError: environment can only contain strings #189

toukcrew opened this issue Nov 23, 2021 · 3 comments

Comments

@toukcrew
Copy link

Hi i keep getting this error, please could someone help. Thanks

Python found!
Found VS 2019 Build Tools - Excellent
Found PyStemmer
Pipenv found!
Requirement already satisfied: PyStemmer==2.0.1 from file:///C:/Users/galin/OneDrive/Stalinis%20kompiuteris/reddit-karma-farming-bot-master/deps/windows/PyStemmer-2.0.1-cp39-cp39-win_amd64.whl in c:\users\galin\appdata\local\programs\python\python39\lib\site-packages (2.0.1)
WARNING: You are using pip version 20.2.3; however, version 21.3.1 is available.
You should consider upgrading via the 'c:\users\galin\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.
Installing dependencies from Pipfile.lock (48156f)...
================================ 0/0 - 00:00:00
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
running without menu
Loading .env environment variables...
Traceback (most recent call last):
File "C:\Users\galin\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\galin\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\galin\AppData\Local\Programs\Python\Python310\Scripts\pipenv.exe_main
.py", line 7, in
File "C:\Users\galin\AppData\Local\Programs\Python\Python310\lib\site-packages\pipenv\vendor\click\core.py", line 1128, in call
return self.main(*args, **kwargs)
File "C:\Users\galin\AppData\Local\Programs\Python\Python310\lib\site-packages\pipenv\vendor\click\core.py", line 1053, in main
rv = self.invoke(ctx)
File "C:\Users\galin\AppData\Local\Programs\Python\Python310\lib\site-packages\pipenv\vendor\click\core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\galin\AppData\Local\Programs\Python\Python310\lib\site-packages\pipenv\vendor\click\core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\galin\AppData\Local\Programs\Python\Python310\lib\site-packages\pipenv\vendor\click\core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "C:\Users\galin\AppData\Local\Programs\Python\Python310\lib\site-packages\pipenv\vendor\click\decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "C:\Users\galin\AppData\Local\Programs\Python\Python310\lib\site-packages\pipenv\vendor\click\core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "C:\Users\galin\AppData\Local\Programs\Python\Python310\lib\site-packages\pipenv\cli\command.py", line 413, in run
do_run(
File "C:\Users\galin\AppData\Local\Programs\Python\Python310\lib\site-packages\pipenv\core.py", line 2495, in do_run
run_fn(*run_args, **run_kwargs)
File "C:\Users\galin\AppData\Local\Programs\Python\Python310\lib\site-packages\pipenv\core.py", line 2410, in do_run_nt
p = _launch_windows_subprocess(script, env)
File "C:\Users\galin\AppData\Local\Programs\Python\Python310\lib\site-packages\pipenv\core.py", line 2400, in _launch_windows_subprocess
return subprocess.Popen([command] + script.args, **options)
File "C:\Users\galin\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 966, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\galin\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1435, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
TypeError: environment can only contain strings
exiting...
Press any key to continue . . .

@digitalftl
Copy link

Open a new terminal and run the following.

  1. c:\users\galin\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip
  2. First, remove your current version of virtualenv: pip uninstall virtualenv
  3. Then, remove your current version of pipenv: pip uninstall pipenv
  4. When you are asked Proceed (y/n)? just enter y. This will give you a clean slate.
  5. Finally, you can once again install pipenv and its dependencies: pip install pipenv

@toukcrew
Copy link
Author

Hey i did all the above in CMD, but still get this error mainly; TypeError: environment can only contain strings' any idea what it could be? Thanks for the help

Python found!
Found VS 2019 Build Tools - Excellent
Found PyStemmer
Pipenv found!
Processing c:\users\galin\onedrive\stalinis kompiuteris\reddit-karma-farming-bot-master\deps\windows\pystemmer-2.0.1-cp39-cp39-win_amd64.whl
PyStemmer is already installed with the same version as the provided wheel. Use --force-reinstall to force an installation of the wheel.
Installing dependencies from Pipfile.lock (48156f)...
================================ 0/0 - 00:00:00
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
running without menu
Loading .env environment variables...
Traceback (most recent call last):
File "c:\users\galin\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\galin\appdata\local\programs\python\python39\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\galin\AppData\Local\Programs\Python\Python39\Scripts\pipenv.exe_main
.py", line 7, in
File "c:\users\galin\appdata\local\programs\python\python39\lib\site-packages\pipenv\vendor\click\core.py", line 1128, in call
return self.main(*args, **kwargs)
File "c:\users\galin\appdata\local\programs\python\python39\lib\site-packages\pipenv\vendor\click\core.py", line 1053, in main
rv = self.invoke(ctx)
File "c:\users\galin\appdata\local\programs\python\python39\lib\site-packages\pipenv\vendor\click\core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\galin\appdata\local\programs\python\python39\lib\site-packages\pipenv\vendor\click\core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\galin\appdata\local\programs\python\python39\lib\site-packages\pipenv\vendor\click\core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "c:\users\galin\appdata\local\programs\python\python39\lib\site-packages\pipenv\vendor\click\decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "c:\users\galin\appdata\local\programs\python\python39\lib\site-packages\pipenv\vendor\click\core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "c:\users\galin\appdata\local\programs\python\python39\lib\site-packages\pipenv\cli\command.py", line 414, in run
do_run(
File "c:\users\galin\appdata\local\programs\python\python39\lib\site-packages\pipenv\core.py", line 2500, in do_run
run_fn(*run_args, **run_kwargs)
File "c:\users\galin\appdata\local\programs\python\python39\lib\site-packages\pipenv\core.py", line 2415, in do_run_nt
p = _launch_windows_subprocess(script, env)
File "c:\users\galin\appdata\local\programs\python\python39\lib\site-packages\pipenv\core.py", line 2405, in _launch_windows_subprocess
return subprocess.Popen([command] + script.args, **options)
File "c:\users\galin\appdata\local\programs\python\python39\lib\subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "c:\users\galin\appdata\local\programs\python\python39\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
TypeError: environment can only contain strings
exiting...
Press any key to continue . . .

@digitalftl
Copy link

I can't get past this error either

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

1 participant