68
69 if domain.lower() not in Client.accepted_domains:
70 accepted_domains_hr = ',\n'.join(Client.accepted_domains)
71 raise InvalidDomain(f"Invalid domain provided\n\nDomain provided:\n{domain}\n\nAccepted domains:\n{accepted_domains_hr}\n\nPlease change your domain to one of these accepted domains.\n") 72 return domain
73
74 # metadata related functions
28
29 def __init__(self, token=None, domain="https://csgoempire.com", ws_url=None, socket_enabled=True, socket_logger_enabled=False, engineio_logger_enabled=False):
30 if token is None:
31 raise ApiKeyMissing() 32 if len(token) != 32:
33 raise InvalidApiKey()
34
30 if token is None:
31 raise ApiKeyMissing()
32 if len(token) != 32:
33 raise InvalidApiKey() 34
35 self.socket_enabled = socket_enabled
36 self.socket_logger_enabled = socket_logger_enabled
96
97 def validate_api_key(self):
98 if self.metadata.user is None:
99 raise InvalidApiKey()100
101 # user related functions
102
The variable name is not defined where it is used. This will lead to an error during the runtime. Make sure there is no typo. If the name was supposed to be imported, verify that you've actually imported the name.
import os.path
if os.path.exits('setup.cfg'): # misspelled `exists`
print('Found config file')
import os.path
if os.path.exists('setup.cfg'):
print('Found config file')