# Buggy code
def should_create_wallet(self, wallet_id):
    if wallet_id == "BTC" or wallet_id == "TBTC":
        # We check whether bitcoinlib is installed, if not, warn the user (should only happen on linux systems)
        try:
            import bitcoinlib
        except ImportError:
            ConfirmationDialog.show_error(
                self.window(),
                "bitcoinlib not found",
                "bitcoinlib could not be located on your system. "
                "Please install it using the following command: "
                "pip install bitcoinlib --user",
            )
            return

    self.request_mgr = TriblerRequestManager()
    self.request_mgr.perform_request(
        "wallets/%s" % wallet_id, self.on_wallet_created, method="PUT", data=""
    )


# Traceback (RuntimeError)
Traceback (most recent call last):
File "TriblerGUI\core_manager.py", line 114, in on_received_state
RuntimeError: Unhandled Error
Traceback (most recent call last):
File "lib\site-packages\twisted\internet\base.py", line 428, in fireEvent

File "lib\site-packages\twisted\internet\defer.py", line 321, in addCallback

File "lib\site-packages\twisted\internet\defer.py", line 310, in addCallbacks

File "lib\site-packages\twisted\internet\defer.py", line 653, in _runCallbacks

--- <exception caught here> ---
File "lib\site-packages\twisted\internet\base.py", line 441, in _continueFiring

File "run_tribler.py", line 73, in start_tribler

File "Tribler\pyipv8\ipv8\util.py", line 14, in helper

File "Tribler\pyipv8\ipv8\util.py", line 26, in blockingCallFromThread

File "Tribler\Core\Session.py", line 487, in start

File "Tribler\Core\APIImplementation\LaunchManyCore.py", line 226, in register

File "Tribler\Core\APIImplementation\LaunchManyCore.py", line 406, in init

File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module

File "Tribler\Core\Modules\wallet\btc_wallet.py", line 4, in <module>

File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module

File "lib\site-packages\bitcoinlib\__init__.py", line 20, in <module>

File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module

File "lib\site-packages\bitcoinlib\encoding.py", line 30, in <module>

File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module

File "lib\site-packages\bitcoinlib\main.py", line 75, in <module>

File "lib\site-packages\bitcoinlib\main.py", line 69, in initialize_lib

exceptions.WindowsError: [Error 3] Het systeem kan het opgegeven pad niet vinden: 'D:\\Program Files\\Tribler\\bitcoinlib\\data/*.*'

# Fixed code
def should_create_wallet(self, wallet_id):
    if (wallet_id == "BTC" or wallet_id == "TBTC") and not self.btc_module_available:
        ConfirmationDialog.show_error(
            self.window(),
            "bitcoinlib not found",
            "bitcoinlib could not be located on your system. "
            "Please install it using the following command: "
            "pip install bitcoinlib --user",
        )
        return

    self.request_mgr = TriblerRequestManager()
    self.request_mgr.perform_request(
        "wallets/%s" % wallet_id, self.on_wallet_created, method="PUT", data=""
    )