reddit-karma-farming-bot icon indicating copy to clipboard operation
reddit-karma-farming-bot copied to clipboard

TypeError: environment can only contain strings

Open toukcrew opened this issue 3 years ago • 3 comments

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 . . .

toukcrew avatar Nov 23 '21 15:11 toukcrew

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

digitalftl avatar Nov 23 '21 22:11 digitalftl

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 . . .

toukcrew avatar Nov 23 '21 22:11 toukcrew

I can't get past this error either

digitalftl avatar Nov 23 '21 22:11 digitalftl