# Buggy code
def __init__(self):
    """Initialize the trakt recommended list object."""
    self.cache_subfolder = __name__.split(".")[-1] if "." in __name__ else __name__
    self.session = requests.Session()
    self.recommender = "Trakt Popular"
    self.default_img_src = "trakt-default.png"
    self.anidb = Anidb(cache_dir=app.CACHE_DIR)


# Traceback (TypeError)
python ~/.sickrage/SickBeard.py -d -p 10101
Traceback (most recent call last):
File "/media/sdq1/home/whipcracker/.sickrage/SickBeard.py", line 9, in <module>
from start import Application
File "/media/sdq1/home/whipcracker/.sickrage/start.py", line 104, in <module>
from medusa.server.core import AppWebServer
File "/media/sdq1/home/whipcracker/.sickrage/medusa/server/core.py", line 17, in <module>
from .web import CalendarHandler, KeyHandler, LoginHandler, LogoutHandler
File "/media/sdq1/home/whipcracker/.sickrage/medusa/server/web/__init__.py", line 7, in <module>
from .home import Home, HomeAddShows, HomeChangeLog, HomeIRC, HomeNews, HomePostProcess
File "/media/sdq1/home/whipcracker/.sickrage/medusa/server/web/home/__init__.py", line 4, in <module>
from .add_shows import HomeAddShows
File "/media/sdq1/home/whipcracker/.sickrage/medusa/server/web/home/add_shows.py", line 29, in <module>
from ....show.recommendations.trakt import TraktPopular
File "/media/sdq1/home/whipcracker/.sickrage/medusa/show/recommendations/trakt.py", line 170, in <module>
tvdb_api_v2 = get_tvdbv2_api()
File "/media/sdq1/home/whipcracker/.sickrage/medusa/show/recommendations/trakt.py", line 41, in get_tvdbv2_api
access_token = auth_api.login_post(authentication_string)
File "/media/sdq1/home/whipcracker/.sickrage/lib/tvdbapiv2/apis/authentication_api.py", line 124, in login_post
callback=params.get('callback'))
File "/media/sdq1/home/whipcracker/.sickrage/lib/tvdbapiv2/api_client.py", line 324, in call_api
response_type, auth_settings, callback)
File "/media/sdq1/home/whipcracker/.sickrage/lib/tvdbapiv2/api_client.py", line 150, in __call_api
post_params=post_params, body=body)
File "/media/sdq1/home/whipcracker/.sickrage/lib/tvdbapiv2/api_client.py", line 360, in request
body=body)
File "/media/sdq1/home/whipcracker/.sickrage/lib/tvdbapiv2/rest.py", line 208, in POST
body=body)
File "/media/sdq1/home/whipcracker/.sickrage/lib/tvdbapiv2/rest.py", line 143, in request
headers=headers)
File "/media/sdq1/home/whipcracker/.sickrage/lib/requests/packages/urllib3/request.py", line 73, in request
**urlopen_kw)
File "/media/sdq1/home/whipcracker/.sickrage/lib/requests/packages/urllib3/request.py", line 151, in request_encode_body
return self.urlopen(method, url, **extra_kw)
File "/media/sdq1/home/whipcracker/.sickrage/lib/requests/packages/urllib3/poolmanager.py", line 165, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "/media/sdq1/home/whipcracker/.sickrage/lib/requests/packages/urllib3/connectionpool.py", line 578, in urlopen
chunked=chunked)
File "/media/sdq1/home/whipcracker/.sickrage/lib/requests/packages/urllib3/connectionpool.py", line 351, in _make_request
self._validate_conn(conn)
File "/media/sdq1/home/whipcracker/.sickrage/lib/requests/packages/urllib3/connectionpool.py", line 814, in _validate_conn
conn.connect()
File "/media/sdq1/home/whipcracker/.sickrage/lib/requests/packages/urllib3/connection.py", line 289, in connect
ssl_version=resolved_ssl_version)
File "/media/sdq1/home/whipcracker/.sickrage/lib/requests/packages/urllib3/contrib/pyopenssl.py", line 328, in ssl_wrap_socket
ctx.load_verify_locations(ca_certs, ca_cert_dir)
File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 303, in load_verify_locations
raise TypeError("cafile must be None or a byte string")
TypeError: cafile must be None or a byte string

# Fixed code
def __init__(self):
    """Initialize the trakt recommended list object."""
    self.cache_subfolder = __name__.split(".")[-1] if "." in __name__ else __name__
    self.session = requests.Session()
    self.recommender = "Trakt Popular"
    self.default_img_src = "trakt-default.png"
    self.anidb = Anidb(cache_dir=app.CACHE_DIR)
    self.tvdb_api_v2 = get_tvdbv2_api()