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

problem pip installing "ValueError: list.remove(x): x not in list" #181

Open
simplynail opened this issue Apr 16, 2020 · 7 comments
Open

Comments

@simplynail
Copy link

Hi,
I'm having problems pip installing bjoern in python 3.7, windows10
I get an error (both inside or outside venv):

Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Pawel\AppData\Local\Temp\pip-install-bodhdlq6\bjoern\setup.py", line 26, in <module>
        SOURCE_FILES.remove('statsd-c-client/statsd-client.c')
    ValueError: list.remove(x): x not in list

any ideas how to overcome this?

@jonashaag
Copy link
Owner

Can you tell how exactly you are installing (pip command?)

@jonashaag
Copy link
Owner

cc @Gufran

@Arthurdw
Copy link

Arthurdw commented Apr 17, 2020

its indeed with pip. I get the same error.

>>> pip install bjoern
Collecting bjoern
  Using cached bjoern-3.1.0.tar.gz (42 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\gebruiker\appdata\local\programs\python\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Gebruiker\\AppData\\Local\\Temp\\pip-install-a5xfux9t\\bjoern\\setup.py'"'"'
; __file__='"'"'C:\\Users\\Gebruiker\\AppData\\Local\\Temp\\pip-install-a5xfux9t\\bjoern\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(c
ode, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Gebruiker\AppData\Local\Temp\pip-install-a5xfux9t\bjoern\pip-egg-info'
         cwd: C:\Users\Gebruiker\AppData\Local\Temp\pip-install-a5xfux9t\bjoern\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Gebruiker\AppData\Local\Temp\pip-install-a5xfux9t\bjoern\setup.py", line 26, in <module>
        SOURCE_FILES.remove('statsd-c-client/statsd-client.c')
    ValueError: list.remove(x): x not in list
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

@jonashaag
Copy link
Owner

Oohhh... can you guys try to change the / for a os.path.join call https://github.com/jonashaag/bjoern/blob/master/setup.py#L26-L27

@Arthurdw
Copy link

Arthurdw commented Apr 18, 2020

Oohhh... can you guys try to change the / for a os.path.join call

Didn't see this comment.
Started looking myself and its indeed because windows path splitters don't use / but \\ (\).
Doing that fixes the current problem. It raises another error tho. Looking into that rn.

@Arthurdw
Copy link

Arthurdw commented May 1, 2020

Use Linux to let it function properly.
Windows doesn't have all the tools by default.

@yinhedot
Copy link

yinhedot commented Feb 26, 2021

Oohhh... can you guys try to change the / for a os.path.join call

Didn't see this comment.
Started looking myself and its indeed because windows path splitters don't use / but \\ ().
Doing that fixes the current problem. It raises another error tho. Looking into that rn.

SOURCE_FILES = [os.path.join('http-parser', 'http_parser.c')] +
[os.path.join('statsd-c-client', 'statsd-client.c')] +
sorted(glob.glob(os.path.join('bjoern', '*.c')))

'''
print(SOURCE_FILES):
['http-parser\\http_parser.c', 'statsd-c-client\\statsd-client.c', 'bjoern\\_bjoernmodule.c', 'bjoern\common.c', 'bjoern\filewrapper.c', 'bjoern\portable_sendfile.c', 'bjoern\request.c', 'bjoern\server.c', 'bjoern\statsd_tags.c', 'bjoern\wsgi.c']
'''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants