valknight / Splatnet2-Rich-Presence

Discord rich presence for Splatoon 2
MIT License
16 stars 6 forks source link

Installation halted at first step [ Bug ] #7

Closed hagretek closed 5 years ago

hagretek commented 5 years ago

Description

I ran setup.py and at the very first step of the installation (Installing requirements...) it halted with an error code I wrote at ### Output, then it tried Installing as a user package. That failed too.

I would like to note that I ran cmd as an administrator.

Output

[ 17:11:24 13-01-2019 ] [ INFO ] Installing requirements...
Command "C:\Users\Hag\AppData\Local\Programs\Python\Python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Hag\\AppData\\Local\\Temp\\pip-install-01pt4bhi\\brotlipy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Hag\AppData\Local\Temp\pip-record-q7zsohl7\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Hag\AppData\Local\Temp\pip-install-01pt4bhi\brotlipy\
[ 17:11:41 13-01-2019 ] [ ERROR ] Failed to instal system wide (we recommend a venv if you're not!
[ 17:11:41 13-01-2019 ] [ INFO ] Attempting to install as a user package
Command "C:\Users\Hag\AppData\Local\Programs\Python\Python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Hag\\AppData\\Local\\Temp\\pip-install-98vuxu39\\brotlipy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\UsersHag\AppData\Local\Temp\pip-record-ybdua6fd\install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in C:\Users\Hag\AppData\Local\Temp\pip-install-98vuxu39\brotlipy\
[ 17:11:55 13-01-2019 ] [ INFO ] Something went wrong while installing requirements. Check your python setup and permissions.

Specs

I tried to investigate, but...

after running cd Users\Hag\AppData\Local\Temp\pip-install-98vuxu39\ (at the root of drive C:\)in hopes of finding the file, it said A rendszer nem találja a megadott elérési utat., basically, the system couldn't find the directory. So, I ran where brotlipy, at the root of drive C:\ again (so it would scan the entire drive). But the system couldn't find any files matching brotlipy.

valknight commented 5 years ago

Huh, this is odd. Could you run python.exe -m pip install -r requirements.txt (replace python.exe with python3.exe if that's what it's named on your system) and see whether that gives the same issue? This seems like a requirement is failing to install on your environment, but I just want to confirm that before moving on.

valknight commented 5 years ago

Okay, I just tested on my laptop, and all seems fine - https://i.imgur.com/1729gNA.png

I'm guessing it may be something to do with 32-bit python on Windows, as everything seems fine here on Linux, but I don't have a Windows machine at the moment to confirm that.

EDIT: Sorry for spamming you on this as well, but have you tried with a virtual environment? It may be another package causing this weird behavior, and we just want to ensure it isn't that.

hagretek commented 5 years ago

I can maybe try running the script once again in Ubuntu (as it wouldn't work before), now that there's a new version of Discord. But I'll still try the method you gave me on Windows.

valknight commented 5 years ago

Awesome, if you report back whether it works or not that would be fantastic.

hagretek commented 5 years ago

The problem is that I don't have pip installed... Not even on Ubuntu...

valknight commented 5 years ago

Try installing python3-pip using your package manager

hagretek commented 5 years ago

Welp, I tried... Installation of pip done and all, but setup.py still wouldn't even work. Same errors.

valknight commented 5 years ago

Can you give a log of what's happening? Sorry for being annoying, but I can't see your system, and saying it's not working doesn't help much.

hagretek commented 5 years ago

Now I'm using Ubuntu 18.04.1 right now. As I said, pip succesfully installed everything from requirements.txt but the errors when running setup.py are the same as in the initial comment.

I also got a popup window saying __init__.py has crashed

hag@hag-ubuntu:~/Asztal/Programok/Discord/Rich Presence/Splatoon 2/Splatnet2-Rich-Presence-master$ python3 setup.py
[ 14:41:54 20-01-2019 ] [ INFO ] Installing requirements...
Segmentation fault (core dumped)
[ 14:42:09 20-01-2019 ] [ ERROR ] Failed to instal system wide (we recommend a venv if you're not!
[ 14:42:09 20-01-2019 ] [ INFO ] Attempting to install as a user package
Segmentation fault (core dumped)
[ 14:42:14 20-01-2019 ] [ INFO ] Something went wrong while installing requirements. Check your python setup and permissions.

dont mind the weird names like Asztal or Programok im not english

valknight commented 5 years ago

Okay, can you give me the output of [python executable] --version and the pip version as well?

hagretek commented 5 years ago

Pip: pip 9.0.1 Python: Python 3.6.7

everything has just been updated using sudo apt update

valknight commented 5 years ago

sudo apt update doesn't update the system, are you sure you didn't mean to run sudo apt upgrade?

hagretek commented 5 years ago

done that as well, but still nothing

valknight commented 5 years ago

Ok, had a look over your edit with logs - a segmentation fault isn't normal, as that's usually an issue with python or a related library that's compiled in C. Can you install + run neofetch, and copy the output here (ofc redacting any personal info if it spits it out)

hagretek commented 5 years ago

copy the output of sudo apt install neofetch? or what?

valknight commented 5 years ago

No, install it, them copy the output of what happens when you run it

hagretek commented 5 years ago

oh, yea, neofetch is this program that outputs the system info...

            .-/+oossssoo+/-.               hag@hag-ubuntu 
        `:+ssssssssssssssssss+:`           ----------------------- 
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 18.04.1 LTS x86_64 
    .ossssssssssssssssssdMMMNysssso.       Host: 20238 Lenovo G510 
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 4.15.0-29-generic 
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 42 mins 
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 2109 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 4.4.19 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 1366x768 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   DE: GNOME 3.28.3 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: GNOME Shell 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   WM Theme: Adwaita 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Theme: Ambiance [GTK2/3] 
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Icons: Communitheme [GTK2/3] 
  +sssssssssdmydMMMMMMMMddddyssssssss+     Terminal: gnome-terminal 
   /ssssssssssshdmNNNNmyNMMMMhssssss/      CPU: Intel i7-4700MQ (8) @ 3.400GHz 
    .ossssssssssssssssssdMMMNysssso.       GPU: AMD Radeon R7 M265 
      -+sssssssssssssssssyyyssss+-         GPU: Intel Haswell Mobile 
        `:+ssssssssssssssssss+:`           Memory: 2769MiB / 7888MiB 
            .-/+oossssoo+/-. 

EDIT: should've deleted the ubuntu logo, but oh well...

valknight commented 5 years ago

DW about the ubuntu logo, it's all chill. That all seems fine, I just wanted to check there wasn't anything funky going on.

Can you run python3 -m pip install –upgrade pip? I have a feeling pip is out of date, and pip isn't updated by apt all the time.

If that doesn't fix the issue, create a virtual environment with python3 -m venv venv/ in the directory you've cloned this tool to. Then run source venv/bin/activate and then python setup.py.

hagretek commented 5 years ago

python3 -m pip install -upgrade pip output:

Traceback (most recent call last):
  File "/usr/share/python-wheels/packaging-17.1-py2.py3-none-any.whl/packaging/requirements.py", line 93, in __init__
    req = REQUIREMENT.parseString(requirement_string)
  File "/usr/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 1632, in parseString
    raise exc
  File "/usr/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 1622, in parseString
    loc, tokens = self._parse( instring, 0 )
  File "/usr/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 1379, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/usr/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 3395, in parseImpl
    loc, exprtokens = e._parse( instring, loc, doActions )
  File "/usr/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 1379, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/usr/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 3717, in parseImpl
    return self.expr._parse( instring, loc, doActions, callPreParse=False )
  File "/usr/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 1379, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/usr/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 3378, in parseImpl
    loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
  File "/usr/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 1383, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/usr/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 2689, in parseImpl
    raise ParseException(instring, loc, self.errmsg, self)
pyparsing.ParseException: Expected W:(abcd...) (at char 0), (line:1, col:1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 82, in __init__
    req = Requirement(req)
  File "/usr/share/python-wheels/packaging-17.1-py2.py3-none-any.whl/packaging/requirements.py", line 97, in __init__
    requirement_string[e.loc:e.loc + 8]))
pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at "'–upgrade'"

I tried installing in a virtual enviroment, but the errors are still the same...

valknight commented 5 years ago

Oh sorry, it's --upgrade, not -upgrade

hagretek commented 5 years ago

pip is installed succesfully, but still, same error again...

no need to stress yourself about this, i just have absolutely no idea why this entire thing wouldn't work

valknight commented 5 years ago

Yeah, seg fault is usually a sign your python is completely fucked beyond repair.

However, can you install the requirements with the normal pip way? It's not ideal, but, it then means you'd be able to run the tool itself, and we can see whether it's a bigger issue with your python, or just an issue with setup.py + your python.

hagretek commented 5 years ago

what do you mean under install pip the normal way? I used sudo apt install python3-pip

valknight commented 5 years ago

No I mean, just use pip the normal way with python3 -m pip install -r requirements.txt

hagretek commented 5 years ago

like without a venv?

valknight commented 5 years ago

Well, venv is preferred, but it shouldn't matter. Try first with the venv though, just incase.

hagretek commented 5 years ago

Also, here is a new line i havent seen before:

sh: 1: /home/hag/Asztal/Programok/Discord/Rich: not found

This is probably because you didnt put the path as a string somewhere in the script. Rich Presence only gets found when it is put between quotation marks in the code, as it has a space in the name. I'll try renaming it and then I'll try running the script again. or do i need to reinitialize the venv if i do changes to the files?

hagretek commented 5 years ago

renamed all the folders (removed the spaces between words in the names) and now the script works perfectly fun.

[ 15:35:36 20-01-2019 ] [ INFO ] Requirements installed! Go have some fun!
hagretek commented 5 years ago

now i have a question real quick... i have the proxy the script gave me set on my phone and i am currently in the nso app. but still, nothing's happening.

[ 15:52:44 20-01-2019 ] [ WARNING ] Cookie invalid - reason: auth - loading proxy to regenerate

EDIT: a little bit of info: i use Android 5.1

also, what is setup.ink? as chrome would just give out the site not existing message...

valknight commented 5 years ago

Setup.ink should redirect to a page which lets you install the certificate used for intercepting NSO traffic. If it's not working, make sure the proxy is set right, and if that fails, try an android emulator

valknight commented 5 years ago

And cool, I'll patch up the installer to work with paths including spaces

valknight commented 5 years ago

@HagRetek Is everything working? If there's no more info I'm going to close as I can't reproduce the issues with the current information given

valknight commented 5 years ago

If more information is given, we can reopen.