-
-
Notifications
You must be signed in to change notification settings - Fork 494
Troubleshooting
Let's discuss the commonly faced errors and how to fix them here.
The Problem
Main.py, aria2c and gulp serve; all three were working correctly but the downloads that were being added were not initializing even when the admin clicked on the 'Start' button.
Solution
Some modules necessary for Main.py that were maybe responsible for starting downloads were missing, eg: websocket-client
. To solve this, just install the module using pip, eg: pip3 install websocket-client
The solution varies from distro to distro but for problems like this
You've got to add your credentials to the DBCon.py. Sample code for DBCon.py is as follows
import MySQLdb
import os
_db=None
def get_db_con () :
global _db
if _db==None:
try:
_db=MySQLdb.connect(user="TYPE_YOUR_USERNAME",passwd="TYPE_YOUR_PASSWORD",db="Bassa")
return _db
except:
return None
else:
return _db
def close_db_con () :
if _db!=None:
_db.close()
You can either change the values in DBCon.py as above or if you have latest codes with you, set the database credentials as environment variables. But check if your DBCon.py has the following line.
MySQLdb.connect("db", os.environ.get('BASSA_DB_USERNAME'), os.environ.get('BASSA_DB_PASSWORD'), os.environ.get('BASSA_DB_NAME'))
If yes, then set these environment variables with your DB details.
BASSA_DB_USERNAME
BASSA_DB_PASSWORD
BASSA_DB_NAME
If you are on Linux, you can do this like export BASSA_DB_NAME=bassa
likewise.
The Problem
While running python setup.py develop
you get the error Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
Solution
Usually you would install Visual Studio 2017, but if you don't need the IDE (which I don't) follow these steps.
Go to https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017. Scroll down the page until you find a download for "Build Tools for Visual Studio 2017".
Click the download the button for Build Tools for Visual Studio. The installer should download automatically. Once downloaded run the installer! Make sure that Visual Studio Build Tools 2017 is selected to be installed. Just click next and continue. It's a pretty large install - about 3GB, so give it time to download.
Go to your Local disk (or C:/ drive) folder. Navigate to the Program Files (x86). Inside Program Files (x86) there should be a folder called Microsoft Visual Studio. Now go to the following directory: 2017/BuildTools/VC/Auxiliary/Build
. Your file explorer should look like this:
And there is your vcvarsall.bat file, make sure to copy the directory of the folder it's in. Now even though you have it's on your computer you still have to add the directory to the environment variable, PATH. To do this first, on your keyboard, press Windows Key + pause or go through Control Panel, and then System. This will take you to a page that shows basic information. Next click 'Advanced System Settings'
A small window should pop up. Click the button labelled 'Environment Variables'.
Now under the 'User Variables for Admin' heading select the path
variable, and then edit. Be very careful as if you delete anything then it may cause you computer to malfunction
On the new window click 'New' (step 1 in the image below) and enter in the directory of vcvarsall.bat (step 2 in the image below) that you should have copied. In my case it will be C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build
. Press enter and your variable has been added to the Path variable. Click 'Ok' (step 3 in the image above) until you get back to the window that shows your systems basic information - you can just exit out of this. Now you can try again, and hopefully your problem will be resolved.