Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8376931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:32:44+00:00 2026-06-09T15:32:44+00:00

I started out with having the same problem as in this question . As

  • 0

I started out with having the same problem as in this question. As one of the answers suggests one can avoid that particular problem by making the app run without SSL. But as Facebook is set to enforce https for apps in just a few days (October 1 2011) that seems like a solution that won’t last. I first tried to enable ssl in app.run (around line 149 in exampleapp.py. Like so:

app.run(host='0.0.0.0', port=port, ssl_context='adhoc')

At first try it failed at start complaining about the missing OpenSSL module. Found a couple of suggestions on how to fix that out there on the net, and choose to do:

(myapp)$ pip install pyopenssl

Now no complaints at start:

(myapp)$ foreman start
10:35:25 web.1     | started with pid 26934
10:35:26 web.1     |  * Running on https://0.0.0.0:5000/
10:35:26 web.1     |  * Restarting with reloader

But then when trying to access the app:

10:35:31 web.1     | ----------------------------------------
10:35:31 web.1     | Exception happened during processing of request from ('127.0.0.1', 61118)
10:35:31 web.1     | Traceback (most recent call last):
10:35:31 web.1     |   File "/usr/local/Cellar/python/2.7.1/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock
10:35:31 web.1     |     self.process_request(request, client_address)
10:35:31 web.1     |   File "/usr/local/Cellar/python/2.7.1/lib/python2.7/SocketServer.py", line 310, in process_request
10:35:31 web.1     |     self.finish_request(request, client_address)
10:35:31 web.1     |   File "/usr/local/Cellar/python/2.7.1/lib/python2.7/SocketServer.py", line 323, in finish_request
10:35:31 web.1     |     self.RequestHandlerClass(request, client_address, self)
10:35:31 web.1     |   File "/usr/local/Cellar/python/2.7.1/lib/python2.7/SocketServer.py", line 639, in __init__
10:35:31 web.1     |     self.handle()
10:35:31 web.1     |   File "path_to_myapp/lib/python2.7/site-packages/werkzeug/serving.py", line 189, in handle
10:35:31 web.1     |     return rv
10:35:31 web.1     | UnboundLocalError: local variable 'rv' referenced before assignment
10:35:31 web.1     | ----------------------------------------
10:35:31 web.1     | Unhandled exception in thread started by <function inner at 0x10139e050>
10:35:31 web.1     | Traceback (most recent call last):
10:35:31 web.1     |   File "path_to_myapp/lib/python2.7/site-packages/werkzeug/serving.py", line 599, in inner
10:35:31 web.1     |     passthrough_errors, ssl_context).serve_forever()
10:35:31 web.1     |   File "path_to_myapp/lib/python2.7/site-packages/werkzeug/serving.py", line 355, in serve_forever
10:35:31 web.1     |     HTTPServer.serve_forever(self)
10:35:31 web.1     |   File "/usr/local/Cellar/python/2.7.1/lib/python2.7/SocketServer.py", line 227, in serve_forever
10:35:31 web.1     |     self._handle_request_noblock()
10:35:31 web.1     |   File "/usr/local/Cellar/python/2.7.1/lib/python2.7/SocketServer.py", line 287, in _handle_request_noblock
10:35:31 web.1     |     self.shutdown_request(request)
10:35:31 web.1     |   File "/usr/local/Cellar/python/2.7.1/lib/python2.7/SocketServer.py", line 459, in shutdown_request
10:35:31 web.1     |     request.shutdown(socket.SHUT_WR)
10:35:31 web.1     | TypeError: shutdown() takes exactly 0 arguments (1 given)

What to do about this? Is it the wrong Python version or just me missunderstanding some other fundamental thing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T15:32:46+00:00Added an answer on June 9, 2026 at 3:32 pm

    It is a bug in Werkzeug, that got fixed.

    Change the Werkzeug version in the requirements.txt file to at least 0.8.2 and run pip install -r requirements.txt to upgrade.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Final Update : Turns out the fix to this problem is a depressing one.
I started to ask this question and then figured out the answer before submitting
I started out from this sample CSS template that provides a sticky footer with
I've started out with a div box that contains a header within it. My
I'm a novice php programmer and having a problem assembling this code to work.
We're having a bit of fun here at work. It all started with one
I've been having an odd problem with some queries that depend on a sub
I have just started with backbone.js. And I'm having a problem in fetching the
So I've just started experimenting with FreeMarker and I've hit this problem. When I
Really weird problem. I have a tableView that pulls data out of a Core

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.