-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
crayons TypeError in core.py #2609
Comments
Please tell us all of the information about the pipenv version running in your environment, per the issue template, I realize it may seem intuitive to you what is happening, but pipenv is super complex and what you think is happening is probably more involved than you're suggesting, so before we jump to any conclusions or start deciding what the solution is, it would be good to diagnose the problem |
Well, of course it was a proposal to give you little bit more information about hot fix which I made after spending hours on checking from top to down in docker and QEMU emulator. However, I am using |
Wild guess, does setting https://docs.pipenv.org/advanced/#pipenv.environments.PIPENV_COLORBLIND |
I just tried with |
I think I kind of know what the root problem is. Crayon can only return None when the input is None, which means that ultimately https://docs.pipenv.org/diagnose/#valueerror-unknown-locale-utf-8 |
Actually the |
Literally no code paths in crayons can return None if the input string is not None. This error can only occur when |
I have the same problem with python-3.7 and pipenv-2018.7.1: Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/cli.py", line 701, in run
do_run(command=command, args=args, three=three, python=python, pypi_mirror=pypi_mirror)
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 2244, in do_run
ensure_project(three=three, python=python, validate=False, pypi_mirror=pypi_mirror)
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 625, in ensure_project
crayons.green(shorten_path(path_to_python)),
TypeError: __str__ returned non-string (type NoneType) |
Please fill out the issue template in full. The bug is not in crayons no matter how many times we see the same output. We have issue templates for a reason. I appreciate that everyone is taking time to troubleshoot, we also spent months (or years) building the library and if you can't spend the time to fill out an issue template we can't offer you any support. |
What does "System pip management" mean (from the documentation of the |
Same problem here, working within a Docker container.
Python container is based on
and it uses the following
|
I am having a special setup. I have a docker in which I create an emulated ARM rootfs using QEMU. Inside the emulated rootfs , I am going to create a virtual environment using pipenv which I can use later on my ARM target.
What is happening now is that I am always receiving the following exception:
As I traced the exception, I found out that problem here is that the python_version() method returns None in my case. Then as I use
docker exec
to runpipenv install
, I think I am mixing different shell environment, therefore crayons.green cannot convert None type to string. My proposal would be simply just usestr
in all crayons e.g.crayons.green(str(python_version(path_to_python)))
The text was updated successfully, but these errors were encountered: