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

ValueError: No closing quotation #2852

Closed
bussiere opened this issue Sep 14, 2018 · 8 comments
Closed

ValueError: No closing quotation #2852

bussiere opened this issue Sep 14, 2018 · 8 comments

Comments

@bussiere
Copy link

Issue description

ValueError: No closing quotation

Expected result

To run pipenv shell

Actual result

-> % pipenv --python 3.7
Virtualenv already exists!
Removing existing virtualenv...
Creating a virtualenv for this project...
Pipfile: /Users/anansi/Workspace/AdminMarque/Pipfile
Using /usr/local/bin/python3.7m (3.7.0) to create virtualenv...
⠋Running virtualenv with interpreter /usr/local/bin/python3.7m
Using base prefix '/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7'
/usr/local/lib/python3.7/site-packages/virtualenv.py:1041: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
New python executable in /Users/anansi/.local/share/virtualenvs/AdminMarque-nGVz-5sd/bin/python3.7
Also creating executable in /Users/anansi/.local/share/virtualenvs/AdminMarque-nGVz-5sd/bin/python
Installing setuptools, pip, wheel...done.
Setting project for AdminMarque-nGVz-5sd to /Users/anansi/Workspace/AdminMarque

Virtualenv location: /Users/anansi/.local/share/virtualenvs/AdminMarque-nGVz-5sd
anansi@pc-82 [13:33:52] [~/Workspace/AdminMarque/app] [master *]
-> % pipenv shell
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 11, in
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 664, in shell
three=three, python=python, fancy=fancy, shell_args=shell_args, pypi_mirror=pypi_mirror
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 2149, in do_shell
shell = choose_shell()
File "/usr/local/lib/python3.7/site-packages/pipenv/shells.py", line 217, in choose_shell
type
, command = detect_info()
File "/usr/local/lib/python3.7/site-packages/pipenv/shells.py", line 25, in detect_info
return shellingham.detect_shell()
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/shellingham/init.py", line 24, in detect_shell
shell = get_shell(pid, max_depth=max_depth)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/shellingham/posix/init.py", line 20, in get_shell
mapping = _get_process_mapping()
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/shellingham/posix/init.py", line 13, in _get_process_mapping
return impl.get_process_mapping()
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/shellingham/posix/_default.py", line 25, in get_process_mapping
args=tuple(shlex.split(args)), pid=pid, ppid=ppid,
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/shlex.py", line 305, in split
return list(lex)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/shlex.py", line 295, in next
token = self.get_token()
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/shlex.py", line 105, in get_token
raw = self.read_token()
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/shlex.py", line 187, in read_token
raise ValueError("No closing quotation")
ValueError: No closing quotation

Steps to replicate

pipenv shell

Please run $ pipenv --support, and paste the results here. Don't put backticks (`) around it! The output already contains Markdown formatting.
-> % pipenv --support | pbcopy

Exception ignored in: <_io.TextIOWrapper name='' mode='w' encoding='UTF-8'>
BrokenPipeError: [Errno 32] Broken pipe

@r4lv
Copy link

r4lv commented Oct 10, 2018

I had the same issue, but closing and reopening the terminal/shell resolved it...

@r4lv
Copy link

r4lv commented Oct 10, 2018

Actually, it was not the shell, but a background process containing a single apostrophe...

I filed an issue to shellingham: sarugaku/shellingham#12

@techalchemy
Copy link
Member

will get this updated in the next pass

techalchemy added a commit that referenced this issue Oct 24, 2018
- Update shellingham, tomlkit, requests, urllib3, certifi, vistir and
  parse
- Fixes #2820
- Fixes #2852

Signed-off-by: Dan Ryan <[email protected]>
@Nazarii
Copy link

Nazarii commented Oct 25, 2018

Had the same issue, downgraded to pipenv==2018.6.25 - works good.

@yeongbin-jo
Copy link

pipenv==2018.6.25 is not working for me. pipenv==v2018.05.18 works good for my case.

python==3.7
macOS 10.14 Mojave

techalchemy added a commit that referenced this issue Oct 30, 2018
- Upgrade pythonfinder
- Upgrade vistir
- Upgrade requirementslib
- Vendor backported version of `functools.lru_cache` for performance
- Fix editable dependency installation when markers are present
- Fix extraneous resource warnings
- Fix filesystem output stream encoding issues
- Fix pythonfinder non-standard python name issues
- Provide full interaction layer to `Pipfile` and `Pipfile.lock` in
  requirementslib
- Fixes #3017
- Fixes #3014
- Fixes #3021
- Fixes #3019

Signed-off-by: Dan Ryan <[email protected]>

Update vendored dependencies

- Update shellingham, tomlkit, requests, urllib3, certifi, vistir and
  parse
- Fixes #2820
- Fixes #2852

Signed-off-by: Dan Ryan <[email protected]>

Cleanup old vendored dependencies

Signed-off-by: Dan Ryan <[email protected]>
@ovnicraft
Copy link

pipenv 2018.10.13 (installed by brew) on macOS 10.14 Mojave is not working.

@techalchemy
Copy link
Member

This is fixed in master. The issue was closed today. Releases have the date in them. I haven’t released the fix yet, so it is probably still broken for anyone who has the affected version

@KINGH242
Copy link

KINGH242 commented Nov 7, 2019

Just for anyone else that may end up here looking for a solution to this issue.

In my case, an apostrophe was in one of the folder names in the filepath for the virtual environment created by pipenv.

I renamed the folder removing the apostrophe, then deleted the virtual environment, then recreated pipenv and ran pipenv install and it worked as advertised.

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

7 participants