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

Install.py requires poetry (Windows 10) #44

Closed
iamnikv opened this issue Jan 11, 2020 · 27 comments
Closed

Install.py requires poetry (Windows 10) #44

iamnikv opened this issue Jan 11, 2020 · 27 comments

Comments

@iamnikv
Copy link

iamnikv commented Jan 11, 2020

Hi @iamkroot,

After running python install.py I get the following log in the console:

image

I installed poetry using the get-poetry.py script, I check if the environment Path is updated and then I restart the console and try again but I get the same result.

User environment variables:

image

System environment variables:

image

From other issues I saw that you recommend doing some diagnostics, so here is the result of that:

image

Also I noticed that I do not have a log file after running the install.py script so I can not paste it here.

System info:

  • OS: Windows 10 Pro 1809 (build 17763.914)
  • Python Version: 3.8.1

Any help would be appreciated!

@iamkroot
Copy link
Owner

@nvvasilev Do you get this error on running this script again after installing poetry?

@iamnikv
Copy link
Author

iamnikv commented Jan 11, 2020

@iamkroot Yes I do.

@iamkroot
Copy link
Owner

That is very weird. Could you share the output of python -c "import subprocess as sp;sp.run(['poetry', '--version'])" please?

@iamnikv
Copy link
Author

iamnikv commented Jan 11, 2020

Yes I restarted the terminal.
Here is the output of python -c "import subprocess as sp;sp.run(['poetry', '--version'])":

image

@iamkroot
Copy link
Owner

iamkroot commented Jan 11, 2020

Yup, that shouldn't be showing an error. What does python -c "import os;print(os.environ['PATH'])" give?

@iamnikv
Copy link
Author

iamnikv commented Jan 11, 2020

Here is the result of python -c "import os;print(os.environ['PATH'])"

image

C:\Program Files (x86)\Common Files\Oracle\Java\javapath C:\Program Files (x86)\Intel\iCLS Client\ C:\Program Files\Intel\iCLS Client\ C:\ProgramData\Oracle\Java\javapath C:\WINDOWS\system32 C:\WINDOWS C:\WINDOWS\System32\Wbem C:\WINDOWS\System32\WindowsPowerShell\v1.0\ C:\Users\nikol\.poetry\bin C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\ C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\ C:\Program Files (x86)\nodejs\ C:\Program Files\Git\cmd C:\Program Files\PuTTY\ 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:\Program Files\Intel\WiFi\bin\ C:\Program Files\Common Files\Intel\WirelessCommon\ C:\WINDOWS\System32\OpenSSH\ C:\Program Files\Microsoft VS Code\bin C:\Users\nikol\AppData\Roaming\Python\Scripts C:\Program Files\dotnet\ C:\Program Files\Microsoft SQL Server\130\Tools\Binn\ C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\ C:\Users\nikol\AppData\Local\Programs\Python\Python38-32\Scripts\ C:\Users\nikol\AppData\Local\Programs\Python\Python38-32\ C:\Users\nikol\AppData\Roaming\npm C:\Users\nikol\AppData\Local\Microsoft\WindowsApps

@iamkroot
Copy link
Owner

The poetry folder doesn't show up here for some reason. Tried restarting your PC?

@iamnikv
Copy link
Author

iamnikv commented Jan 11, 2020

Isn't it this one: C:\Users\nikol\.poetry\bin C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\ ?
Row 4 of my prev comment of the output.

@iamnikv
Copy link
Author

iamnikv commented Jan 11, 2020

I also tried restarting the machine a couple of times but with no success..

@iamkroot
Copy link
Owner

iamkroot commented Jan 12, 2020

Row 4 of my prev comment of the output.

You're right. I should've looked more carefully.

Can you open that folder(C:\Users\nikol\.poetry\bin) and confirm that poetry.exe is present there? Also, try python -c "import subprocess as sp;sp.run(['echo', '%PATH%'])" and python -c "import subprocess as sp;sp.run(['where', 'poetry'])"

@iamnikv
Copy link
Author

iamnikv commented Jan 12, 2020

Actually in C:\Users\nikol\.poetry\bin I only have these 2 files: poetry and poetry.bat

image

And here is the output of the commands:

image

So maybe I have to get poetry.exe in the C:\Users\nikol\.poetry\bin folder somehow?

@iamkroot
Copy link
Owner

In the normal cmd, what does where poetry give?

@iamnikv
Copy link
Author

iamnikv commented Jan 12, 2020

Here is the output:

image

@iamkroot
Copy link
Owner

Hmm then I don't really see why the install script is failing :/

Let's try one thing. Run python -c "import subprocess as sp;sp.run(['poetry', '--version'], shell=True)" and let's see if it works.

@iamnikv
Copy link
Author

iamnikv commented Jan 12, 2020

Ok, here is the output:

image

I have four other versions of python installed (2.7, 2.7.15 (64-bit), 3.4.3 and 3.6.8). Can they somehow mess up the script?

@iamkroot
Copy link
Owner

iamkroot commented Jan 12, 2020 via email

@iamnikv
Copy link
Author

iamnikv commented Jan 12, 2020

Ok, I will try it and report the result back.

@iamnikv
Copy link
Author

iamnikv commented Jan 12, 2020

Output:

image

@iamnikv
Copy link
Author

iamnikv commented Jan 12, 2020

You are right that adding , shell=True fixed the problem with requiring poetry.
Should I open another issue for the file not found issue? :\

@iamkroot
Copy link
Owner

iamkroot commented Jan 13, 2020

@nvvasilev my fault. You also have to modify one more line (line #69) where you need to put , shell=True too (before the , cwd=... part)

@iamnikv
Copy link
Author

iamnikv commented Jan 13, 2020

We are getting closer!

image

Maybe I have to put , shell=True somewhere else as well?

@iamnikv
Copy link
Author

iamnikv commented Jan 13, 2020

Got it! On line 99 ["poetry", "env", "info", "-p"], shell=True, cwd=str(install_dir), text=True the sp.check_output function.

And now I just have to reboot.

image

@iamnikv
Copy link
Author

iamnikv commented Jan 13, 2020

How can I tell if it is working and is there an easy test I can make with a movie or an show episode? What should I see in trakt.tv? I am new to that site and it is a little confusing and overwhelming with information.

And thanks for the help!

@iamkroot
Copy link
Owner

@nvvasilev Dont worry. You can look through the log file to see if the scrobbler has started correctly. (location is given in the README file)

@iamnikv
Copy link
Author

iamnikv commented Jan 14, 2020

Here is the log after restarting the PC and after a few minutes starting VLC player manually:

DEBUG - MainThread - utils - C:\Users\nikol\AppData\Roaming\trakt-scrobbler\trakt_cache.json doesn't exist. DEBUG - MainThread - utils - C:\Users\nikol\AppData\Roaming\trakt-scrobbler\trakt_token.json doesn't exist. INFO - MainThread - trakt_interface - Access token not found in config. Initiating device authentication. INFO - MainThread - trakt_interface - Verification URL: https://trakt.tv/activate INFO - MainThread - trakt_interface - User Code: 0FC1F06B DEBUG - MainThread - trakt_interface - Waiting for user to authorize the app. DEBUG - MainThread - trakt_interface - Waiting for user to authorize the app. DEBUG - MainThread - trakt_interface - Waiting for user to authorize the app. DEBUG - MainThread - trakt_interface - Waiting for user to authorize the app. DEBUG - MainThread - trakt_interface - Waiting for user to authorize the app. DEBUG - MainThread - trakt_interface - Waiting for user to authorize the app. INFO - MainThread - trakt_interface - Device auth successful. DEBUG - MainThread - utils - C:\Users\nikol\AppData\Roaming\trakt-scrobbler\trakt_cache.json doesn't exist. DEBUG - MainThread - utils - C:\Users\nikol\AppData\Roaming\trakt-scrobbler\trakt_cache.json doesn't exist. INFO - MainThread - scrobbler - Started scrobbler thread. DEBUG - MainThread - utils - C:\Users\nikol\AppData\Roaming\trakt-scrobbler\watched_cache.json doesn't exist. INFO - MainThread - monitor - Started monitor for vlc INFO - vlc - monitor - Unable to connect to vlc. Ensure that the web interface is running. DEBUG - MainThread - utils - C:\Users\nikol\AppData\Roaming\trakt-scrobbler\trakt_cache.json doesn't exist. DEBUG - MainThread - utils - C:\Users\nikol\AppData\Roaming\trakt-scrobbler\trakt_cache.json doesn't exist. INFO - MainThread - scrobbler - Started scrobbler thread. INFO - MainThread - monitor - Started monitor for vlc INFO - vlc - monitor - Unable to connect to vlc. Ensure that the web interface is running.
I noticed that the web interface is running only when VLC player is launched. Does that mean that when I start it the vlc monitor will connect and start monitoring it. I don't get a log update after I start VLC player and the web interface is available, saying that the monitor is connected.

@iamkroot
Copy link
Owner

iamkroot commented Jan 14, 2020

Are you sure your interface is working (you can open it from your browser localhost:PORT), and that the port/password have been specified properly in the config file?

@iamkroot
Copy link
Owner

Closed, since the main issue has been fixed. If you are still facing problems with scrobbling, please create a new issue.

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

2 participants