-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAuditCleanse.py
666 lines (534 loc) · 26.5 KB
/
AuditCleanse.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
from __future__ import print_function
import os
import ctypes
import stat
import platform
import sys
import argparse
from datetime import datetime, timedelta, date
import time
import pyperclip
import pysnow
import subprocess
from colorama import Fore, Back, Style
from termcolor import cprint
from os.path import expanduser
import logging
import re
import urllib.request
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
import _updateHandler
import _priviledgeHandler
import _toolsHandler
import _glob
try:
from msvcrt import getch,kbhit
OS = True
except ImportError:
OS = False
from getch import getch
import termios
'''
---------------------------------------
Maintenance Variables
--------------------------------------- '''
_glob.version = [1, 1, 2, 'b']
_glob.scriptname = os.path.basename(__file__).split('.')[0] + '.exe'
_glob.downloadDIR = '/scripts/Python'
_glob.filePath = os.path.realpath(__file__).split('.')[0] + '.exe'
'''
---------------------------------------
Logo
--------------------------------------- '''
_glob.logo = """
-------------------- █████ ██ ██ ██████ ██ ████████ --------------------
-------------------- ██ ██ ██ ██ ██ ██ ██ ██ --------------------
-------------------- ███████ ██ ██ ██ ██ ██ ██ -----------------------
-------------------- ██ ██ ██ ██ ██ ██ ██ ██ -----------------------
------------------- ██ ██ ██████ ██████ ██ ██ -----------------------
----------- ██████ ██ ███████ █████ ███ ██ ███████ ███████ ----------
---------- ██ ██ ██ ██ ██ ████ ██ ██ ██ ----------
---------- ██ ██ █████ ███████ ██ ██ ██ ███████ █████ ------------
---------- ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ -----------
----------- ██████ ███████ ███████ ██ ██ ██ ████ ███████ ███████ ----------"""
'''
---------------------------------------
Changelog
--------------------------------------- '''
Changelog = """
------------------------------
AuditCleanse -- Version 1.1.2b
------------------------------
RECENT UPDATES
--------------
-- 1.1.2b
Fixed duplicate issue
-- 1.1.1d
Fixed uppercase issue
-- 1.1.1c
Fixed immediate close
Fixed Empty TKT update
-- 1.1.1b
Minor fixes
"""
'''
---------------------------------------
Main
--------------------------------------- '''
def main():
_toolsHandler.header()
AuditDictionary = {}
# Holds many different items based on each CS# entry
AuditList = []
# Holds a list of the items on the Audit for easier handling
totalTicketNumber = 0
# Holds total number of items on the Audit
GoodScannedList = []
# List of items on Audit accounted for
WronglyScannedList = []
# List of items that were scanned but not on the Audit
username, serviceNow, auditTKT = login()
# Creates a serviceNow session for the passed information, also returns the technicians username and Audit Ticket
u_computer_supportTable = serviceNow.resource(api_path='/table/u_computer_support')
# ServiceNow object to search items in the u_computer_support table
sys_userTable = serviceNow.resource(api_path='/table/sys_user')
# ServiceNow object to search for users and information based on their sysID
taskTable = serviceNow.resource(api_path='/table/task')
# ServiceNow object to work on the audit ticket
auditChoice, u_depot_location, u_location = auditSetup()
# Sets up the audit, getting the user's office and what audit they want
AuditList, totalTicketNumber = queryReport(auditChoice, u_depot_location, u_location, serviceNow)
# Returns a full list of all tickets that should be on the audit
if auditChoice == 0 or auditChoice == 1:
# If doing Repair or Assignment Audit
gatherer(serviceNow, AuditDictionary, AuditList, totalTicketNumber, sys_userTable, u_computer_supportTable)
# Gathers information on the CS tickets such as 'assigned to', 'state', and such
sorted(AuditList, key=lambda x: (AuditDictionary[x]['state'], AuditDictionary[x]['username']))
# Sorts the items by CS#
repairer(serviceNow, AuditDictionary, AuditList, sys_userTable, u_computer_supportTable)
# Repairs the tickets that are not set correctly, such as devices marked open but not in queue
_toolsHandler.header()
NotScannedList = auditConsole(AuditDictionary, AuditList, GoodScannedList, WronglyScannedList)
# The actual power of the program, returns the items still on the list that were not accounted for
WronglyScannedListDict = {}
if len(NotScannedList) > 0:
_toolsHanlder.header()
print(Fore.CYAN + ' Not Scanned Items:' + Style.RESET_ALL)
printer(AuditDictionary, NotScannedList)
print('')
input(' Press Enter to Continue.')
if len(WronglyScannedList) > 0:
_toolsHanlder.header()
print(Fore.CYAN + ' Errorly Scanned Items:' + Style.RESET_ALL)
gatherer(serviceNow, WronglyScannedListDict, WronglyScannedList, len(WronglyScannedList), sys_userTable, u_computer_supportTable)
printer(WronglyScannedListDict, WronglyScannedList)
print('')
input(' Press Enter to Continue.')
u_computer_supportTable = serviceNow.resource(api_path='/table/u_computer_support')
# Service Now object to search items in the u_computer_support table
sys_userTable = serviceNow.resource(api_path='/table/sys_user')
# Service Now object to search for users and information based on their sysID
for i,each in enumerate(GoodScannedList):
_toolsHanlder.header()
print(' Updating Tickets')
print(' ' + format(i) + ' / ' + format(len(GoodScannedList)))
updateCS(serviceNow, each, 'work_notes', username + ' verified this device is at ' + u_location + ' on the Daily Repair Audit.', u_computer_supportTable)
else:
_toolsHanlder.header()
NotScannedList = auditConsole({}, AuditList, GoodScannedList, WronglyScannedList)
if len(NotScannedList) > 0:
_toolsHanlder.header()
print(Fore.CYAN + ' Not Scanned Items:' + Style.RESET_ALL)
for i,each in enumerate(NotScannedList):
print(' ' + format(i).center(3) + ' | ' + each)
print('')
input(' Press Enter to Continue.')
if len(WronglyScannedList) > 0:
_toolsHanlder.header()
print(Fore.CYAN + ' Errorly Scanned Items:' + Style.RESET_ALL)
for i,each in enumerate(WronglyScannedList):
print(' ' + format(i).center(3) + ' | ' + each)
print('')
input(' Press Enter to Continue.')
taskTable = serviceNow.resource(api_path='/table/task')
auditCloser(WronglyScannedList, NotScannedList, auditTKT, taskTable, serviceNow)
print('')
print(Fore.RED + ' THE PROGRAM IS NOW COMPLETE.' + Style.RESET_ALL)
print('\n'*2)
wait('Press any key to close.')
sys.exit()
'''
---------------------------------------
Script-Specific Function Declaration
--------------------------------------- '''
def auditCloser(WrongList_, NotList_, audittkt, table, serviceNow):
_toolsHanlder.header()
print(' The Audit TKT has been updated.')
string = ''
if NotList_ != []:
string += 'The following items were not found, along with the resolution to find them:\n'
for each in NotList_:
string += '- ' + each + ' - Resolution: \n'
if WrongList_ != []:
string += 'The following items were scanned but not on the audit, along with their resolution:\n'
for each in WrongList_:
string += '- ' + each + ' - Resolution: \n'
if NotList_ == [] and WrongList_ == []:
string = 'All tickets were accounted for.'
updateCS(serviceNow, audittkt, 'description', string, table)
def login():
import getpass
username = input('Please input your Liberty Username: ')
password = getpass.getpass('Please input your Liberty Password: ')
ticket = input('Please input your Audit TKT: ')
serviceNow = pysnow.Client(instance='Liberty', user=username, password=password)
return username, serviceNow, ticket
def repairer(serviceNow, AuditDictionary_, AuditList_, sys_userTable, u_computer_supportTable):
UpdatedList = []
for ticket in AuditList_:
if AuditDictionary_[ticket]['state'] == 'Open':
if AuditDictionary_[ticket]['username'] == '' and AuditDictionary_[ticket]['substate'] != 'In Queue':
updateCS(serviceNow, ticket, 'u_substate', '489fb3f02b3c9200258f89efe8da156d', u_computer_supportTable)
elif AuditDictionary_[ticket]['username'] != '' and AuditDictionary_[ticket]['substate'] == 'In Queue':
updateCS(serviceNow, ticket, 'state', '2', u_computer_supportTable)
updateCS(serviceNow, ticket, 'u_substate', '', u_computer_supportTable)
elif AuditDictionary_[ticket]['username'] != '':
updateCS(serviceNow, ticket, 'state', '2', u_computer_supportTable)
else:
continue
UpdatedList.append(ticket)
gatherer(serviceNow, AuditDictionary_, UpdatedList, len(UpdatedList), sys_userTable, u_computer_supportTable)
def updateCS(serviceNow, Ticket_, Field_, Payload_, Table_):
update = {Field_:Payload_}
pushUpdate = Table_.update(query={'number':Ticket_}, payload=update)
return True
def printer(AuditDictionary_, subList):
print(Style.BRIGHT + Fore.RED + ' # | Item | Assigned To | State | Substate ')
print(Style.RESET_ALL + '-----|-------------|--------------------|-----------|---------------------------')
toggle = True
for i,k in enumerate(subList):
if toggle:
toggle = False
print(Style.BRIGHT, end="")
else:
toggle = True
print(Style.RESET_ALL, end="")
print(' ' + format(i + 1)[:3].center(3), end='')
print(' | ', end='')
print(k[:11].center(11), end="")
print(' | ', end='')
print(AuditDictionary_[k]['username'][:18].center(18), end="")
print(' | ', end='')
if AuditDictionary_[k]['state'] == 'Closed':
print(Style.BRIGHT, end='')
print(Fore.YELLOW + AuditDictionary_[k]['state'].center(9), end="")
print(Fore.RESET + ' | ', end='')
print(Fore.YELLOW + AuditDictionary_[k]['substate'][:25].center(25))
print(Fore.RESET, end='')
if toggle:
print(Style.BRIGHT, end="")
else:
print(Style.RESET_ALL, end="")
elif AuditDictionary_[k]['state'] == 'Open' or AuditDictionary_[k]['substate'] == 'In Queue':
print(Style.BRIGHT, end='')
print(Fore.CYAN + AuditDictionary_[k]['state'].center(9), end="")
print(Fore.RESET + ' | ', end='')
print(Fore.CYAN + AuditDictionary_[k]['substate'][:25].center(25))
print(Fore.RESET, end='')
if toggle:
print(Style.BRIGHT, end="")
else:
print(Style.RESET_ALL, end="")
elif AuditDictionary_[k]['state'] == 'On Hold':
print(Style.BRIGHT, end='')
print(Fore.MAGENTA + AuditDictionary_[k]['state'].center(9), end="")
print(Fore.RESET + ' | ', end='')
print(Fore.MAGENTA + AuditDictionary_[k]['substate'][:25].center(25))
print(Fore.RESET, end='')
if toggle:
print(Style.BRIGHT, end="")
else:
print(Style.RESET_ALL, end="")
elif AuditDictionary_[k]['state'] == 'Working':
print(Style.BRIGHT, end='')
print(AuditDictionary_[k]['state'].center(9), end="")
print(' | ', end='')
print(AuditDictionary_[k]['substate'][:25].center(25))
if toggle:
print(Style.BRIGHT, end="")
else:
print(Style.RESET_ALL, end="")
elif AuditDictionary_[k]['state'] == 'NULL':
print(Style.BRIGHT, end='')
print(Fore.RED + AuditDictionary_[k]['state'].center(9), end="")
print(Fore.RESET + ' | ', end='')
print(Fore.RED + AuditDictionary_[k]['substate'][:25].center(25))
print(Fore.RESET, end='')
if toggle:
print(Style.BRIGHT, end="")
else:
print(Style.RESET_ALL, end="")
else:
print(AuditDictionary_[k]['state'].center(9), end="")
print(' | ', end='')
print(AuditDictionary_[k]['substate'][:25].center(25))
print(Style.RESET_ALL, end='')
def auditConsole(AuditDictionary_, AuditList_, GoodScannedList_, WronglyScannedList_):
subList = AuditList_
while True:
_toolsHandler.header()
if AuditDictionary_ != {}:
printer(AuditDictionary_, subList)
print(Fore.RED + Style.BRIGHT + ' ' + format(len(subList) + 1).center(3) + ' | ' + 'END PROGRAM'.center(11))
print(Style.RESET_ALL, end="")
_toolsHandler.line()
print(' Enter a CS Number or the Number of the item')
else:
for i,each in enumerate(subList):
print(' ' + format(i + 1)[:3].center(3), end='')
print(' | ', end='')
print(each)
print(Fore.RED + Style.BRIGHT + ' ' + format(len(AuditList_) + 1).center(3) + ' | ' + 'END PROGRAM' + Style.RESET_ALL)
userInput = input(' > ')
try:
userInput = int(userInput)
if userInput == len(subList) + 1:
return subList
userInput -= 1
if len(subList) < userInput:
continue
if userInput < 0:
continue
GoodScannedList_.append(subList[userInput])
subList.remove(subList[userInput])
except:
userInput = userInput.strip()
userInput = userInput.upper()
try:
subList.remove(userInput)
GoodScannedList_.append(userInput)
print('\a')
except:
if userInput not in AuditList_:
if userInput not in WronglyScannedList_:
WronglyScannedList_.append(userInput)
def gatherer(serviceNow, Dictionary_, List_, totalTicketNumber_, sys_userTable, u_computer_supportTable):
for i,each in enumerate(List_):
_toolsHandler.header()
print(' GATHERING INFORMATION')
print(' ' + format(i) + ' / ' + format(totalTicketNumber_))
try:
username, state, substate = getDetails(each, serviceNow, u_computer_supportTable, sys_userTable)
Dictionary_[each] = {}
Dictionary_[each]['username'] = username
Dictionary_[each]['state'] = state
Dictionary_[each]['substate'] = substate
Dictionary_[each]['ticket'] = each
except:
Dictionary_[each] = {}
Dictionary_[each]['username'] = 'NULL'
Dictionary_[each]['state'] = 'NULL'
Dictionary_[each]['substate'] = 'NULL'
Dictionary_[each]['ticket'] = each
_toolsHandler.header()
def queryReport(auditChoice, u_depot_location, u_location, serviceNow):
temporaryList = []
if auditChoice == 0:
qb = (
pysnow.QueryBuilder()
.field('number').starts_with('CS')
.AND()
.field('cat_item').contains('Repair')
.AND()
.field('u_depot_location').equals(u_depot_location)
.OR()
.field('location').contains(u_location)
.AND()
.field('state').equals(['1','2','11'])
.OR()
.field('u_substate').equals(['Ready for pickup', 'c4b3f3702b3c9200258f89efe8da1504'])
)
incident = serviceNow.resource(api_path='/table/u_computer_support')
response = incident.get(query=qb)
temptotal = 0
for record in response.all():
temporaryList.append(record['number'])
elif auditChoice == 1:
qb = (
pysnow.QueryBuilder()
.field('number').starts_with('CS')
.AND()
.field('cat_item').contains('Assignment')
.AND()
.field('u_depot_location').equals(u_depot_location)
.OR()
.field('location').contains(u_location)
.AND()
.field('state').equals(['1','2','11'])
.OR()
.field('u_substate').equals(['Ready for pickup', 'c4b3f3702b3c9200258f89efe8da1504'])
)
incident = serviceNow.resource(api_path='/table/u_computer_support')
response = incident.get(query=qb)
temptotal = 0
for record in response.all():
temporaryList.append(record['number'])
else:
while True: #loop while person is idiot and does not copy their list properly
_toolsHandler.header()
print(' I cannot automatically gather that audit, please export')
print(' the audit as a .xlsx, then copy the items from the sheet')
wait(' then press any key. >> DO NOT PASTE THE LIST << \n')
try:
if platform.system() == 'Windows': #to split the list into useable CS# / Serial#
temporaryList = pyperclip.paste().split()
else:
temporaryList = pyperclip.paste().split()
except:
print(' I cannot get your clipboard. Paste it to a txt file, and remove newlines')
temporaryList = input(' Try pasting it here: ').split()
_toolsHandler.header()
for i,item in enumerate(temporaryList): #to format list as: '[x] item' where x is a numbered list
temporaryList[i] = item.upper()
print('[' + format(i + 1) + '] ' + item)
checkBool = wait('Is this correct? [y/n]: ')
if (checkBool is 'y') or (checkBool is 'Y'):
break;
temporaryList.sort()
return temporaryList, len(temporaryList)
def auditSetup():
auditMenu = []
auditMenu = ['Daily Repair Audit', 'Weekly Assignment Audit', 'Weekly Storage Audit', 'Weekly Loaner Audit']
auditChoice = _toolsHandler.PR_('Which audit are you running?', auditMenu)
locationMenu = ['Demoss Hall', 'Green Hall', 'LUCOM', 'River Ridge']
locationChoice = _toolsHandler.PR_('Which Office are you located?', locationMenu)
if locationChoice == 0:
u_depot_location = '862a49f29c806d40f47c19537d850ca4'
u_location = 'DH 2414'
elif locationChoice == 1:
u_depot_location = 'b37c34a019e0d5405af136ec3a0d0ef3'
u_location = 'GH 1539'
elif locationChoice == 2:
u_depot_location = '1db6a5ff353fd1405af1cb6de5727f34'
u_location = 'CMHS 3122A'
elif locationChoice == 3:
u_depot_location = '59ac3ca019e0d5405af136ec3a0d0e4c'
u_location = 'RRA 171'
return auditChoice, u_depot_location, u_location
def getUsername(sysID, serviceNow, sys_userTable):
if sysID == 'NULL':
return ''
sys_user = sys_userTable.get(query={'sys_id':sysID}, fields=['name'])
user_fullName = sys_user.one()[u'name']
return user_fullName
def getTicketState(stateNumber):
if stateNumber == '1':
state_name = 'Open'
elif stateNumber == '2':
state_name = 'Working'
elif stateNumber == '3':
state_name = 'Closed'
elif stateNumber == '7':
state_name = 'Cancelled'
elif stateNumber == '11':
state_name = 'On Hold'
else:
state_name = 'Unknown'
return state_name
def getTicketSubState(substateNumber):
try:
substateNumber = substateNumber['value']
except:
substate_name = ''
return substate_name
if substateNumber == '':
substate_name = ''
#WIP
elif substateNumber == '5747a37c2bf89200258f89efe8da1585':
substate_name = 'External Repair Location'
elif substateNumber == '258140052b3c9200258f89efe8da15df':
substate_name = 'Customer Contacted'
elif substateNumber == 'd671c4052b3c9200258f89efe8da1542':
substate_name = 'Delivered'
elif substateNumber == 'f94148052b3c9200258f89efe8da15c3':
substate_name = 'Inventory Recieved'
elif substateNumber == 'b3437f302b3c9200258f89efe8da15ac':
substate_name = 'Laptop Recieved'
elif substateNumber == '3a62f7302b3c9200258f89efe8da1545':
substate_name = 'Waiting for hardware'
#Closed
elif substateNumber == 'ed6abde42bf426001235717bf8da15b9':
substate_name = 'Pending Transfer'
elif substateNumber == 'c4b3f3702b3c9200258f89efe8da1504':
substate_name = 'Ready for Pickup'
#Open
elif substateNumber == '489fb3f02b3c9200258f89efe8da156d':
substate_name = 'In Queue'
#On Hold
elif substateNumber == '3a62f7302b3c9200258f89efe8da1545':
substate_name = 'Waiting for Hardware'
elif substateNumber == '99a40c452b3c9200258f89efe8da159b':
substate_name = 'Waiting on Customer'
elif substateNumber == 'cb467ce92bf0d200258f89efe8da157f':
substate_name = 'Waiting on Non-IT Resource'
elif substateNumber == 'a83877b02b3c9200258f89efe8da15b7':
substate_name = 'Waiting to Reformat'
#Cancelled
#else
else:
substate_name = 'Unknown'
return substate_name
def getDetails(ticketNumber, serviceNow, table, usertable):
ticket = table.get(query={'number':ticketNumber}, fields=['assigned_to', 'state', 'u_substate'])
ticket_allInformation = ticket.all()
for ticket_allInformationIterable in ticket_allInformation:
try:
ticket_assigned_to_sysID = ticket_allInformationIterable[u'assigned_to'][u'value']
#print('good1')
except:
ticket_assigned_to_sysID = 'NULL'
try:
ticket_state = ticket_allInformationIterable[u'state']
#print('good2')
except:
ticket_state = 'NULL'
try:
ticket_u_substate = ticket_allInformationIterable['u_substate']
#print('good3')
except:
ticket_u_substate = 'NULL'
#try:
assigned_to = getUsername(ticket_assigned_to_sysID, serviceNow, usertable)
# print('this worked')
#except:
# return '', '', ''
state = getTicketState(ticket_state)
substate = getTicketSubState(ticket_u_substate)
#print(assigned_to + ' ' + state + ' ' + substate + '<<')
#wait()
return assigned_to, state, substate
#------------------------------------------------
# For functionality of Python
if __name__ == '__main__':
import traceback
try:
_priviledgeHandler.checkPriv()
_updateHandler.checkVersion()
main()
except Exception as inst:
_toolsHandler.clear()
print(" Unexpected Error!")
print(' -----------------')
print(" Version: ", _glob.version[0], _glob.version[1], _glob.version[2], _glob.version[3])
print(" -----------------")
print(" BEGINNING ERROR REPORT:")
print(" -----------------------")
print(" -----------------------")
print(" Primary Error: ", inst)
print(" -----------------------")
traceback.print_exc()
print(" -----------------------")
print(" Please go to the following to create a bug report:")
print(" https://goo.gl/forms/oEeldwsAW98gwAEm1")
input('\n\n Press Enter to close!')