Aug-02-2021, 10:05 AM
thanks a lot snippsat. It worked.
(Jul-31-2021, 12:39 PM)snippsat Wrote: There are SyntaxError in both in print and write.
As mention bye ndc85430 Traceback should show this.
Can no do this
Error:λ python tk_test.py File "G:\div_code\tk_test.py", line 9 (labnamevalue.get(),patientnamevalue.get(), workvalue.get(), toothnumbervalue.get(), materialvalue.get(), shadevalue.get(), labservicevalue.get(),orderdatevalue.(dt.datetime.now():%a, %b %d %Y)) ^ SyntaxError: f-string: invalid syntaxorderdatevalue.
is a attribute access and call it with tuple with date object inside will never work.
Also can not use tuple around date object inside a f-string.
>>> import datetime as dt >>> >>> d = f'{(dt.datetime.now():%a, %b %d %Y)}' File "<interactive input>", line 1 ((dt.datetime.now():%a, %b %d %Y)) ^ SyntaxError: f-string: invalid syntax # Fix >>> d = f'{dt.datetime.now():%a, %b %d %Y}' >>> d 'Sat, Jul 31 2021Test increment with smaller step as you new to this,also line of length 210 character is way to long.