question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

vcrpy failing in python3

See original GitHub issue

I’m hitting issues when install the latest vcrpy under pipenv 11.8.3.

Expected result

I’m running pipenv lock -v and its barking on vcrpy 's dependencies. specifically looks like yarl and the python_version syntax. It seems like pipenv is adding some duplication to what i see in the vcrpy dependency list.

Actual result

Here’s a dump from my shell:

$ pipenv lock -v                                                                                                                                                                                                
Locking [dev-packages] dependencies…                                                                                                                                                                               
Using pip: -i https://pypi.python.org/simple                                                                                                                                                                       
                                                                                                                                                                                                                   
                          ROUND 1                                                                                                                                                                                  
Current constraints:                                                                                                                                                                                               
  factory_boy                                                                                                                                                                                                      
  vcrpy==1.10.5                                                                                                                                                                                                    
                                                                                                                                                                                                                   
Finding the best candidates:                                                                                                                                                                                       
  found candidate factory-boy==2.10.0 (constraint was <any>)                                                                                                                                                       
  found candidate vcrpy==1.10.5 (constraint was ==1.10.5)                                                                                                                                                          
                                                                                                                                                                                                                   
Finding secondary dependencies:                                                                                                                                                                                    
  factory-boy==2.10.0       requires Faker>=0.7.0                                                                                                                                                                  
  vcrpy==1.10.5             requires PyYAML, six>=1.5, wrapt, yarl; python_version in "3.4, 3.5, 3.6"; python_version in "3.4, 3.5, 3.6"                                                                           
                                                                                                                                                                                                                   
INFO:pip9._vendor.requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): pypi.python.org                                                                                                      
Traceback (most recent call last):                                                                                                                                                                                 
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/patched/notpip/_vendor/packaging/markers.py", line 278, in __init__                                                                                   
    self._markers = _coerce_parse_result(MARKER.parseString(marker))                                                                                                                                               
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/vendor/pip9/_vendor/pyparsing.py", line 1617, in parseString                                                                                          
    raise exc                                                                                                                                                                                                      
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/vendor/pip9/_vendor/pyparsing.py", line 1607, in parseString                                                                                          
    loc, tokens = self._parse( instring, 0 )                                                                                                                                                                       
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/vendor/pip9/_vendor/pyparsing.py", line 1379, in _parseNoCache                                                                                        
    loc,tokens = self.parseImpl( instring, preloc, doActions )                                                                                                                                                     
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/vendor/pip9/_vendor/pyparsing.py", line 3376, in parseImpl                                                                                            
    loc, exprtokens = e._parse( instring, loc, doActions )                                                                                                                                                         
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/vendor/pip9/_vendor/pyparsing.py", line 1383, in _parseNoCache                                                                                        
    loc,tokens = self.parseImpl( instring, preloc, doActions )                                                                                                                                                     
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/vendor/pip9/_vendor/pyparsing.py", line 3164, in parseImpl                                                                                            
    raise ParseException(instring, loc, self.errmsg, self)                                                                                                                                                         
pip9._vendor.pyparsing.ParseException: Expected stringEnd (at char 28), (line:1, col:29)                                                                                                                           
                                                                                                                                                                                                                   
During handling of the above exception, another exception occurred:                                                                                                                                                
                                                                                                                                                                                                                   
Traceback (most recent call last):
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/patched/piptools/resolver.py", line 329, in _iter_dependencies
    yield InstallRequirement.from_line(_dependency_string, constraint=ireq.constraint)
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/patched/notpip/req/req_install.py", line 181, in from_line
    markers = Marker(markers)
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/patched/notpip/_vendor/packaging/markers.py", line 282, in __init__
    raise InvalidMarker(err_str)
notpip._vendor.packaging.markers.InvalidMarker: Invalid marker: 'python_version in "3.4, 3.6"; python_version in "3.4', parse error at '; python'


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/patched/notpip/_vendor/packaging/markers.py", line 278, in __init__
    self._markers = _coerce_parse_result(MARKER.parseString(marker))
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/vendor/pip9/_vendor/pyparsing.py", line 1617, in parseString
    raise exc
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/vendor/pip9/_vendor/pyparsing.py", line 1607, in parseString
    loc, tokens = self._parse( instring, 0 )
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/vendor/pip9/_vendor/pyparsing.py", line 1379, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/vendor/pip9/_vendor/pyparsing.py", line 3376, in parseImpl
    loc, exprtokens = e._parse( instring, loc, doActions )
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/vendor/pip9/_vendor/pyparsing.py", line 1383, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/vendor/pip9/_vendor/pyparsing.py", line 3164, in parseImpl
    raise ParseException(instring, loc, self.errmsg, self)
pip9._vendor.pyparsing.ParseException: Expected stringEnd (at char 33), (line:1, col:34)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/resolver.py", line 82, in <module>
    main()
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/resolver.py", line 71, in main
    clear=do_clear,
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/resolver.py", line 63, in resolve
    verbose=verbose,
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/utils.py", line 425, in resolve_deps
    pre,
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/utils.py", line 336, in actually_resolve_reps
    resolved_tree.update(resolver.resolve(max_rounds=PIPENV_MAX_ROUNDS))
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/patched/piptools/resolver.py", line 102, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/patched/piptools/resolver.py", line 200, in _resolve_one_round
    for dep in self._iter_dependencies(best_match):
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/patched/piptools/resolver.py", line 331, in _iter_dependencies
    yield InstallRequirement.from_line(dependency_string, constraint=ireq.constraint)
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/patched/notpip/req/req_install.py", line 181, in from_line
    markers = Marker(markers)
  File "/home/mike/.local/lib/python2.7/site-packages/pipenv/patched/notpip/_vendor/packaging/markers.py", line 282, in __init__
    raise InvalidMarker(err_str)
notpip._vendor.packaging.markers.InvalidMarker: Invalid marker: 'python_version in "3.4, 3.5, 3.6"; python_version in "3.4, 3.5, 3.6"', parse error at '; python'

Steps to replicate

See my Pipfile output below in the system debug. This doesn’t seem to be an error when I remove the python requirements in the Pipfile and it uses my system default (python2).

Here’s my system debug output.

$ python -m pipenv.help output

Pipenv version: '11.8.3'

Pipenv location: '/home/mike/.local/lib/python2.7/site-packages/pipenv'

Python location: '/usr/bin/python'

Other Python installations in PATH:

  • 2.7: /usr/bin/python2.7

  • 2.7: /usr/bin/python2.7

  • 3.5: /usr/bin/python3.5m

  • 3.5: /usr/bin/python3.5

  • 2.7.13: /usr/bin/python

  • 2.7.13: /usr/bin/python2

  • 3.5.3: /usr/bin/python3

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '0',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.14.24-grsec',
 'platform_system': 'Linux',
 'platform_version': '#1 SMP Sun Mar 4 20:08:15 UTC 2018',
 'python_full_version': '2.7.13',
 'python_version': '2.7',
 'sys_platform': 'linux2'}

System environment variables:

  • SVN_EDITOR
  • _ZSH_TMUX_FIXED_CONFIG
  • LESS
  • GNOME_DESKTOP_SESSION_ID
  • ZSH_TMUX_AUTOSTART
  • GJS_DEBUG_OUTPUT
  • LC_CTYPE
  • WINDOWPATH
  • XDG_CURRENT_DESKTOP
  • XDG_SESSION_TYPE
  • LOGNAME
  • USER
  • HOME
  • XDG_VTNR
  • PATH
  • PYTHONUNBUFFERED
  • VIRTUALENVWRAPPER_SCRIPT
  • ZSH
  • DISPLAY
  • XDG_SESSION_DESKTOP
  • LANG
  • TERM
  • SHELL
  • SSH_AGENT_PID
  • XAUTHORITY
  • JOURNAL_STREAM
  • SESSION_MANAGER
  • SHLVL
  • QT_LINUX_ACCESSIBILITY_ALWAYS_ON
  • QT_QPA_PLATFORMTHEME
  • ZSH_TMUX_AUTOQUIT
  • QT_ACCESSIBILITY
  • WINDOWID
  • AUTO_NTFY_DONE_LONGER_THAN
  • EDITOR
  • ZSH_TMUX_AUTOSTARTED
  • AND_SDK
  • _VIRTUALENVWRAPPER_API
  • GPG_AGENT_INFO
  • ZSH_TMUX_TERM
  • USERNAME
  • WORKON_HOME
  • XDG_RUNTIME_DIR
  • AND_ADT
  • VIRTUALENVWRAPPER_PROJECT_FILENAME
  • SSH_AUTH_SOCK
  • VTE_VERSION
  • TMUX
  • GDMSESSION
  • PS1
  • PYTHONDONTWRITEBYTECODE
  • PIPENV_ACTIVE
  • PIP_PYTHON_PATH
  • XDG_SESSION_ID
  • DBUS_SESSION_BUS_ADDRESS
  • _
  • VIRTUALENVWRAPPER_HOOK_DIR
  • ANSIBLE_NOCOWS
  • DESKTOP_SESSION
  • LSCOLORS
  • GTK_MODULES
  • AUTO_NTFY_DONE_IGNORE
  • OLDPWD
  • GDM_LANG
  • GEM_HOME
  • XDG_DATA_DIRS
  • PWD
  • COLORTERM
  • XDG_MENU_PREFIX
  • LS_COLORS
  • PAGER
  • GJS_DEBUG_TOPICS
  • TMUX_PANE
  • XDG_SEAT

Pipenv–specific environment variables:

  • PIPENV_ACTIVE: 1

Debug–specific environment variables:

  • PATH: /home/mike/.gem/ruby/2.3.0/bin:/home/mike/.local/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
  • SHELL: /usr/bin/zsh
  • EDITOR: vim
  • LANG: en_US.UTF-8
  • PWD: /home/mike/Documents/Gits/securedrop.org

Contents of Pipfile (‘/home/mike/Documents/Gits/securedrop.org/Pipfile’):

[[source]]

verify_ssl = true
url = "https://pypi.python.org/simple"
name = "pypi"

[requires]
python_version = "3"


[packages]

wagtail = "<1.13"
zxcvbn-python = "*"


[dev-packages]

factory_boy = "*"
# https://github.com/kevin1024/vcrpy/issues/342
vcrpy = "==1.10.5"

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
techalchemycommented, Mar 20, 2018

@msheiny just saw this myself, I see where the issue is, will have a fix shortly

1reaction
msheinycommented, Mar 21, 2018

thanks @techalchemy for the amazingly quick response and I also confirmed the fix locally. i just switched to using this tool and i’m loving the team already.

Read more comments on GitHub >

github_iconTop Results From Across the Web

vcrpy Documentation
This is useful when a request failed to be found, we can get the similar request(s) in order to know what have changed...
Read more >
1830949 – python-vcrpy fails to build: Incorrect import in httplib2
Bug 1830949 - python-vcrpy fails to build: Incorrect import in httplib2 ... (most recent call last): File "/usr/lib64/python3.9/unittest/loader.py", ...
Read more >
vcrpy 1.6.0 - PyPI
Travis so you don't have to worry about them failing if you submit a pull request. ... 1.1.3 Fix python3 headers field (thanks...
Read more >
python3-vcr_4.0.2-1_all.deb Debian 11 Download - Debian PKGS.org
Description. python3-vcr - record and replay HTML interactions (Python3 library) ... debian/tests/python3-vcr - Exclude TLS failing tests.
Read more >
Mailman 3 Issue recording VCR tapes in Postorius.
My "tox -e record" attempts fail with tracebacks like the attached. ... Why is tox creating this as a Python 3 virtualenv? All...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found