question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EXCEPTION! 'NoneType' object has no attribute 'strip'

See original GitHub issue

Summary

Fail to run streamlit on Python3.6.3 with anaconda and docker

Steps to reproduce

Just Type streamlit hello

Expected behavior:

Try to run streamlit according to the document

Actual behavior:

Make an exception as EXCEPTION! ‘NoneType’ object has no attribute ‘strip’

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
hcoohbcommented, Mar 27, 2020

For me this error is raised when I start the streamlit script with --server.headless True But sometimes it runs and gives a very strange message:

  You can now view your Streamlit app in your browser.

  Network URL: http://10.204.150.61:8511
  External URL: http://<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Expires" content="-1"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Cache-Control" content="no-cache"/>
	<meta name="id" content="polLoginRedirect" >
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Policy Login Redirect</title>
	<script type="text/JavaScript" src="jquery_1_8_3-6.2.5-1589068415(eng).js"></script>
	<script type="text/javascript">
	<!--
	var strPolicyRequir = "The policy set up by your network administrator requires that ";
	var strAuthYourself = "you authenticate yourself with this firewall before you can have access.";
	var strAuthYourselfInDomain = "only authenticated users are allowed access through this firewall. You do not appear to be logged into the domain, and so must authenticate yourself before you can have access.";
	var strAuthIntro = "To authenticate yourself click on the following link and enter your user name and password to log in to the firewall.";
	var strClickLogin = "Click here to log in";
	// -->
	</script>
	<script type="text/JavaScript" src="polLoginRedirect.js"></script>
	<link rel=stylesheet href="swl_login-6.2.5-328142343(eng).css" TYPE="text/css">
</head>
<body class="login_bg">
	<div class="login_outer">
		<div class="login_inner">
			<div class="vgap48"></div>
			<div class="login_logo">
				<img src="logo_sw.png">
			</div>
			<div class="login_prodname">
				Network Security Appliance
			</div>
			<div class="vgap48"></div>
			<div class="contentWithIconBox">
				<div class="containter_left">
					<div class="icon_warning"></div>
				</div>
				<div class="container_right">
					<div class="login_msg_header">
						Authentication Required
					</div>
					<div id="popup_box_text" class="login_msg_content">
						<a href="https://10.7.0.14:444/auth.html?cid=3"></a>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>:8511

Note that I run it as a service so it has never run with a headless=False, so there are no credentials created.

I found that if I add the option --browser.serverAddress "0.0.0.0", it seems to work

Note that I am with

  • windows 10, running as a service
  • python 3.7.7
  • streamlit 0.56
0reactions
schwarzboxcommented, Apr 17, 2020

I deploy app in heroku and before this I try run app locally.

$ heroku local

My app starts as expected but I include shell script which must run in server. This script create file ~/.streamlit/config.toml [server] headless = true enableCORS=false port = 5000

After that a had this exception. I had same EXCEPTION! ‘NoneType’ object has no attribute ‘strip’

Yes. I can run app like suggest @hcoohb

$ streamlit hello --browser.serverAddress “0.0.0.0”

But I just remove config.toml 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: 'NoneType' object has no attribute 'strip'
The string attribute of a is None . You need to look over the documentation for BeautifulSoup and see what .find_all() returns. –...
Read more >
AttributeError: 'NoneType' object has no attribute 'strip' #70
The error is because the python str method .strip() is trying to operate on a None, rather than the expected string. The only...
Read more >
Error: 'NoneType' object has no attribute 'strip' - Google Groups
When I save the record in database I get this error: Error: 'NoneType' object has no attribute 'strip'. My model is: from django.db...
Read more >
10765 (AttributeError: 'NoneType' object has no attribute 'strip')
When he fills out the form and posts it he receives the following error message: AttributeError: 'NoneType' object has no attribute 'strip'.
Read more >
AttributeError: 'NoneType' object has no attribute 'strip' - Reddit
AttributeError : 'NoneType' object has no attribute 'strip' ; u/AIManiak avatar. AIManiak · 5 · Oh by <> I meant by placing the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found