<p dir="auto">I am unable to add a postgres database, on web browser when I check it it says ok but when i click save it says:</p>
<p dir="auto">'NoneType' object has no attribute 'encode'</p>
<p dir="auto">When I try to add or edit a database, i get the error "'NoneType' object has no attribute 'encode'" and no database is added or edited.<br>
This happens with the demo database as well as a Snowflake database.<br>
Clicking on "Test Connection" shows success.</p>
<h3 dir="auto">Expected results</h3>
<p dir="auto">The database is added to the list of sources</p>
<h3 dir="auto">Actual results</h3>
<p dir="auto">An error message is displayed: 'NoneType' object has no attribute 'encode'<br>
There is no information on the console output, loglevel is "DEBUG"</p>
<h4 dir="auto">Screenshots</h4>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/17614384/78109276-2f8c5b80-73f9-11ea-91d7-0918686e4e27.png"><img width="1574" alt="Bildschirmfoto 2020-04-01 um 09 13 20" src="https://user-images.githubusercontent.com/17614384/78109276-2f8c5b80-73f9-11ea-91d7-0918686e4e27.png" style="max-width: 100%;"></a></p>
<h4 dir="auto">How to reproduce the bug</h4>
<ol dir="auto">
<li>Go to Sources -&gt; Database</li>
<li>Click on "Save"</li>
<li>See error</li>
</ol>
<h3 dir="auto">Environment</h3>
<p dir="auto">Docker container</p>
<p dir="auto">Host Information:</p>
<ul dir="auto">
<li>superset version: latest Master branch</li>
<li>python version: 3.7.7</li>
<li>node.js version: 12.8.0</li>
<li>npm version: 6.11.2</li>
</ul>
<h3 dir="auto">Checklist</h3>
<p dir="auto">Make sure these boxes are checked before submitting your issue - thank you!</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the superset logs for python stacktraces and included it here as text if there are any.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have reproduced the issue with at least the latest released version of superset.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the issue tracker for the same issue and I haven't found one similar.</li>
</ul>
<h3 dir="auto">Additional context</h3>
<p dir="auto">Host OS: MacOS Mojave 10.14.6<br>
The Snowflake connection string looks like this:<br>
snowflake://USER:xxxxxxxx@nfXXXX.eu-central-1/DATABASE/PUBLIC?warehouse=WAREHOUSE&amp;role=PRODUCTION_USER<br>
Snowflake-SQLalchemy is installed.</p>