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.

NameError: global name 'InvalidMarker' is not defined

See original GitHub issue
Issue description

pipenv install results in NameError: global name 'InvalidMarker' is not defined traceback.

I’ve seen several other closed issues related to Invalid Marker, but I was unable to discover any cause from them.

Expected result

Should have created new virtualenv and installed glyphsLib 2.4.0 and its dependencies

Actual result
C:\SRC\GitHub\pysilfont>pipenv.exe --rm
Removing virtualenv (C:\Users\bobh\.virtualenvs\pysilfont-Lv_ggtc6)...

C:\SRC\GitHub\pysilfont>pipenv.exe install --verbose
Creating a virtualenv for this project...
Pipfile: C:\SRC\GitHub\pysilfont\Pipfile
Using C:\Python27\python.exe (2.7.13) to create virtualenv...
Running virtualenv with interpreter C:\Python27\python.exe
New python executable in C:\Users\bobh\.virtualenvs\pysilfont-Lv_ggtc6\Scripts\python.exe
Installing setuptools, pip, wheel...done.
Setting project for pysilfont-Lv_ggtc6 to C:\SRC\GitHub\pysilfont

Virtualenv location: C:\Users\bobh\.virtualenvs\pysilfont-Lv_ggtc6
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Traceback (most recent call last):
  File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\pipenv.exe\__main__.py", line 9, in <module>
  File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 697, in main
    rv = self.invoke(ctx)
  File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "c:\python27\lib\site-packages\pipenv\cli.py", line 435, in install
    selective_upgrade=selective_upgrade,
  File "c:\python27\lib\site-packages\pipenv\core.py", line 1943, in do_install
    pypi_mirror=pypi_mirror,
  File "c:\python27\lib\site-packages\pipenv\core.py", line 1312, in do_init
    pypi_mirror=pypi_mirror,
  File "c:\python27\lib\site-packages\pipenv\core.py", line 1057, in do_lock
    settings['packages'], project, r=False, include_index=True
  File "c:\python27\lib\site-packages\pipenv\utils.py", line 513, in convert_deps_to_pip
    new_dep = Requirement.from_pipfile(dep_name, dep)
  File "c:\python27\lib\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 766, in from_pipfile
    r = NamedRequirement.from_pipfile(name, pipfile)
  File "c:\python27\lib\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 88, in from_pipfile
    return cls(**creation_args)
  File "<attrs generated init a6e0ca26c49ba3dc9d3385e0a2ff78e4bcd1f859>", line 9, in __init__
  File "c:\python27\lib\site-packages\pipenv\vendor\attr\validators.py", line 106, in __call__
    self.validator(inst, attr, value)
  File "c:\python27\lib\site-packages\pipenv\vendor\requirementslib\models\utils.py", line 140, in validate_specifiers
    except (InvalidMarker, InvalidSpecifier):
NameError: global name 'InvalidMarker' is not defined
c:\python27\lib\site-packages\pipenv\_compat.py:113: ResourceWarning: Implicitly cleaning up <TemporaryDirectory 'c:\\users\\bobh\\appdata\\local\\temp\\pipenv-ai84cx-requirements'>
  warnings.warn(warn_message, ResourceWarning)

C:\SRC\GitHub\pysilfont>
Steps to replicate
pipenv.exe install --verbose

Pipfile is show within the pipenv --support output included below.


$ pipenv --support

Pipenv version: '2018.7.1'

Pipenv location: 'c:\\python27\\lib\\site-packages\\pipenv'

Python location: 'c:\\python27\\python.exe'

Other Python installations in PATH:

  • 2.7: C:\Python27\python.exe

  • 2.7.13: C:\Python27\python.exe

  • 3.7.0: C:\Windows\py.exe

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '0',
 'os_name': 'nt',
 'platform_machine': 'AMD64',
 'platform_python_implementation': 'CPython',
 'platform_release': '10',
 'platform_system': 'Windows',
 'platform_version': '10.0.17134',
 'python_full_version': '2.7.13',
 'python_version': '2.7',
 'sys_platform': 'win32'}

System environment variables:

  • TMP
  • COMPUTERNAME
  • USERDOMAIN
  • PSMODULEPATH
  • PYTHONDONTWRITEBYTECODE
  • COMMONPROGRAMFILES
  • PROCESSOR_IDENTIFIER
  • VBOX_MSI_INSTALL_PATH
  • PROGRAMFILES
  • PROCESSOR_REVISION
  • PATH
  • SYSTEMROOT
  • PROGRAMFILES(X86)
  • COMSPEC
  • DRIVERDATA
  • TEMP
  • COMMONPROGRAMFILES(X86)
  • GDLPP_PREFS
  • PROCESSOR_ARCHITECTURE
  • ALLUSERSPROFILE
  • LOCALAPPDATA
  • HOMEPATH
  • USERDOMAIN_ROAMINGPROFILE
  • PROGRAMW6432
  • USERNAME
  • LOGONSERVER
  • PROMPT
  • SESSIONNAME
  • PROGRAMDATA
  • ONEDRIVE
  • PERLLIB
  • PATHEXT
  • PIP_PYTHON_PATH
  • ASL.LOG
  • WINDIR
  • APPDATA
  • HOMEDRIVE
  • SYSTEMDRIVE
  • NUMBER_OF_PROCESSORS
  • SAL_DISABLE_GRAPHITE
  • PROCESSOR_LEVEL
  • PROCESSOR_ARCHITEW6432
  • COMMONPROGRAMW6432
  • OS
  • PUBLIC
  • USERPROFILE

PipenvΓÇôspecific environment variables:

DebugΓÇôspecific environment variables:

  • PATH: C:\Program Files (x86)\Intel\iCLS Client\;C:\Python27\;C:\Python27\Scripts;C:\DosUtils;C:\Program Files (x86)\GnuWin32\bin;C:\Program Files\Intel\iCLS Client\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\TortoiseSVN\bin;C:\Program Files\IDM Computer Solutions\UltraEdit;C:\Program Files\IDM Computer Solutions\UltraCompare;C:\Program Files\PuTTY\;C:\DosUtils\Libxml;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files (x86)\Common Files\Acronis\VirtualFile\;C:\Program Files (x86)\Common Files\Acronis\VirtualFile64\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files\TortoiseHg\;C:\Program Files (x86)\Common Files\Acronis\FileProtector\;C:\Program Files (x86)\Common Files\Acronis\FileProtector64\;C:\HashiCorp\Vagrant\bin;C:\Program Files\Graphite Compiler\;C:\Program Files (x86)\Adobe\FDK\Tools\win;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Users\bobh\AppData\Local\Microsoft\WindowsApps;C:\Users\bobh\AppData\Local\atom\bin;C:\Users\bobh\AppData\Local\Microsoft\WindowsApps;C:\Users\bobh\AppData\Local\Atlassian\SourceTree\git_local\mingw32\bin\;

Contents of Pipfile (‘C:\SRC\GitHub\pysilfont\Pipfile’):

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

[packages]
glyphsLib = "2.4.0"

[dev-packages]
glyphsLib = "2.4.0"

[requires]
python_version = "2.7"

[pipenv]
allow_prereleases = true

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
fmarmolcommented, Sep 12, 2018

@bobh0303 The right syntax generated by pipenv install glyphsLib==2.4.0 is:

[packages]
glyphslib = "==2.4.0"
0reactions
jwflorycommented, Jul 2, 2019

This would be helpful to include in the example documentation, either for Pipenv or Pipfile. I was stuck with the same problem and didn’t realize it was a formatting issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NameError: global name is not defined - python - Stack Overflow
I'm using Python 2.6.1 on Mac OS X. I have two simple Python files (below), but when I run python update_url.py. I get...
Read more >
NameError: global name 'or_' is not defined - Google Groups
Anybody had this problem when defining 'or_' clauses? Code: labels = session.query(model.Label).select(or_(query_str)). 'query_str' is a string of OR ...
Read more >
python NameError: global name '__file__' is not defined
PYTHON : python NameError : global name '__file__' is not defined [ Gift : Animated Search Engine : https://www.hows.tech/p/recommended.html ] ...
Read more >
"NameError: global name 'guestFamily' is not defined" error ...
"NameError: global name 'guestFamily' is not defined" error while upgrading from vCSA 6.0.x to 6.5.x fails at precheck (67578) · Symptoms.
Read more >
1381538 – NameError: global name 'AnsibleError' is not defined
Unexpected Exception: global name 'AnsibleError' is not defined the full traceback was: Traceback (most recent call last): File "/usr/bin/ansible-playbook", ...
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