When executing below I’m getting “KeyError: DEFAULT”
%%sql
select count(*) from classicmodels_obt.orders;
Please help
Thanks
Regards
Ranjit. S
When executing below I’m getting “KeyError: DEFAULT”
%%sql
select count(*) from classicmodels_obt.orders;
Please help
Thanks
Regards
Ranjit. S
Hello @ranjitsrinivasan,
I could reproduce the issue and getting the DEFAULT error. It seems its connected to the prettytable library. You can bypass this if you add a second cell after the libraries impoert. Code to ADD:
from prettytable import PrettyTable , PLAIN_COLUMNS
table = PrettyTable()
table.set_style(PLAIN_COLUMNS)
%config SqlMagic.style = ‘PLAIN_COLUMNS’
Georgios
above solution works
Thanks
thank you Georgios.
your solution works
another solution is to add cell with:
%config SqlMagic.style = '_DEPRECATED_DEFAULT'
right after cell with:
%load_ext sql
@Konstantin Yes I noticed it happens in other labs of this course and as well, I reported the issue and should be fixed soon. Your solution should work too, thanks:
%config SqlMagic.style = '_DEPRECATED_DEFAULT'
didn’t work for me, but
%config SqlMagic.style = 'DEFAULT'
did the trick! hope that helps someone
Hello @marinaganopolsky,
Which lab/week did you get that error and fixed it with %config SqlMagic.style = 'DEFAULT'
? I tried C4W1 Practice Lab: Data Normalization and It looks it works fine with '_DEPRECATED_DEFAULT'
.Thank you
sorry, I should have specified - C4W4 - first part of the capstone project.
Ok , I will try to run it now wihtout any %config SqlMagic.style
at all and report it to fix if it happens. Thanks for let us know
Hello @marinaganopolsky,
I tried the C4W4 first capstone project without any %config SqlMagic.style
as it is and didn’t get any error. Glad you got it fixed and hopefuly it will help other as well. These are my outputs for the cells after %load_ext sql
: