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

Unable to Download videos in KA-Lite 0.16.7 on Windows7 #5263

Closed
yogeshmr opened this issue Aug 27, 2016 · 10 comments
Closed

Unable to Download videos in KA-Lite 0.16.7 on Windows7 #5263

yogeshmr opened this issue Aug 27, 2016 · 10 comments
Milestone

Comments

@yogeshmr
Copy link

Summary

I have downloaded videos in bulk from Torrent when I was having KA-Lite 0.16.5 and using it smoothly. I did a fresh installation of KA-Lite 0.16.7 and copied all the videos and assessment files to "content" folder. I scanned the videos and everything got detected and working without any issue.

In the Videos tab, I found that few chapters do not have videos and hence wanted to download the videos discretely for those chapters. But this feature is not working.

System information

Please specify the KA Lite version you were using and your operating system!

  • Operating system: Windows 7
  • Version: 0.16.7
  • Browser: Chrome

Traceback or relevant snippet from server.log

INSERT TRACEBACK, LOG MESSAGES ETC. HERE

How to reproduce

  1. Login to KA-Lite 0.16.7 as administrator
  2. Click on Manage -> Videos
  3. Click on any subject which is partially green or completely blank.
  4. Select one or more videos for downloading
  5. Click on Download Videos button.

Screenshots

The below snapshot shows the error message:

image

The below snapshot shows my content folder directory:

image

Real-life consequences (anything community should be aware, for instance how it affects your deployment)

Since the bulk download of videos using Torrent has few content videos missing, they cannot be downloaded interactively as well and thus completely missing out on those contents.

@benjaoming
Copy link
Contributor

Hi @yogeshmr - thanks for reporting!

This is definitely because requests is the wrong version. Would you be able to run kalite shell from your command line?

If the command doesn't exist, try doing cd C:\path\to\where\python\is\installed. Example:

cd c:\python27\Scripts
kalite shell
import requests
print requests.__name__
print requests.__version__

The output can help us identify what's wrong...

Because of a bug in Windows, we don't have logging #5057

@yogeshmr
Copy link
Author

Hi @benjaoming - Thank you very much for the quick response!

Please find below the output after running the above commands:

C:>cd Python27

C:\Python27>cd Scripts

C:\Python27\Scripts>kalite shell
C:\Python27\Scripts\kalite:129: RuntimeWarning: Could not determine Python in yo
ur path, defaulting to C:\Python27\python.exe
warnings.warn("Could not determine Python in your path, defaulting to {0:s}".f
ormat(python_executable), RuntimeWarning)
Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on wi
n32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)

import requests
print requests.name
requests
print requests.version
0.14.2

@benjaoming
Copy link
Contributor

benjaoming commented Aug 29, 2016

@yogeshmr - I think I know what the issue is now. After upgrading, .pyc files have not been deleted in ka-lite/python-packages.

If you could locate and delete all the pyc files and delete them -- you should probably use a file search to do it.

I had a mistake in the commands I asked you to run -- if you replace __name__ with __file__, you will see the path of the pyc file that's from the previous install.

#3952 will solve this issue permanently so it doesn't have to fixed in the windows installer.

@benjaoming
Copy link
Contributor

@yogeshmr any luck?

@yogeshmr
Copy link
Author

yogeshmr commented Sep 5, 2016

@benjaoming I deleted all the .pyc files using the "Search Everything" tool. The .pyc files keep reappearing with every action. But even after deleting all the .pyc files, the video download still has error.

@benjaoming
Copy link
Contributor

@yogeshmr - after deleting the *pyc files, could you try running the commands from before again? I.e.:

C:>cd Python27
C:\Python27>cd Scripts
C:\Python27\Scripts>kalite shell

>>> import requests
>>> print requests.__file__
>>> print requests.__version__

@yogeshmr
Copy link
Author

yogeshmr commented Sep 6, 2016

@benjaoming

After deleting the *.pyc file completely, I ran the above commands and obtained below response:

image

The Video downloads is throwing below error message:

image

@benjaoming
Copy link
Contributor

benjaoming commented Sep 6, 2016

@yogeshmr thanks for investigating again! It seems that it's not just the *pyc files from your previous install that weren't removed at the upgrade. It's the whole folder in C:\Python27\share\kalite\python-packages\requests that you should remove. After that, restart the server, and it should be fine.

If you can confirm that this works, I'll add this in the docs for other potential Windows users that are upgrading from 0.15.

@yogeshmr
Copy link
Author

yogeshmr commented Sep 7, 2016

@benjaoming Its (the video downloads) working after deleting all the contents of the requests folder in C:\Python27\share\kalite\python-packages\requests.

Thank you very much for your great support!

@benjaoming
Copy link
Contributor

Thanks for the feedback! Glad we could solve it. I'm adding it to the known issues, but we have to mark it as a wontfix, because a subsequent 0.17 will deal with the underlying cause of the unpruned directory.

Please feel welcome with all further technical issues here on Github or in our community support forums :)

@benjaoming benjaoming added this to the 0.16.9 milestone Sep 7, 2016
benjaoming added a commit that referenced this issue Sep 8, 2016
Add a known issue for Windows upgrades from 0.15 due to #5263
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

2 participants