Opened 8 years ago

Closed 8 years ago

#4056 closed defect (fixed)

bridgedb tracebacks

Reported by: arma Owned by: aagbsn
Priority: Medium Milestone:
Component: Circumvention/BridgeDB Version:
Severity: Keywords:
Cc: aagbsn@…, arma Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Traceback (most recent call last):
  File "/usr/lib/python2.6/runpy.py", line 122, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.6/runpy.py", line 34, in _run_code
    exec code in run_globals
  File "/home/bridges/lib/python2.6/site-packages/TorBridgeDB.py", line 4, in <module>
    bridgedb.Main.run()
  File "/home/bridges/lib/python2.6/site-packages/bridgedb/Main.py", line 381, in run
    startup(configuration)
  File "/home/bridges/lib/python2.6/site-packages/bridgedb/Main.py", line 339, in startup
    Server.addWebServer(cfg, ipDistributor, webSchedule)
  File "/home/bridges/lib/python2.6/site-packages/bridgedb/Server.py", line 268, in addWebServer
    useRecaptcha=cfg.RECAPTCHA_ENABLED,
AttributeError: Conf instance has no attribute 'RECAPTCHA_ENABLED'

running 054560d33d74e7 with no new lines added to my config file. The fix presumably is to check if the config line is present before trying to access it. (Once I added the config line I didn't get the traceback.)

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/twisted/internet/base.py", line 1165, in run
    self.mainLoop()
  File "/usr/lib/python2.6/dist-packages/twisted/internet/base.py", line 1174, in mainLoop
    self.runUntilCurrent()
  File "/usr/lib/python2.6/dist-packages/twisted/internet/base.py", line 796, in runUntilCurrent
    call.func(*call.args, **call.kw)
  File "/usr/lib/python2.6/dist-packages/twisted/internet/task.py", line 194, in __call__
    d = defer.maybeDeferred(self.f, *self.a, **self.kw)
--- <exception caught here> ---
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 125, in maybeDeferred
    result = f(*args, **kw)
  File "/home/bridges/lib/python2.6/site-packages/bridgedb/Dist.py", line 299, in cleanDatabase
    db.cleanWarnedBridges(time.time()-MAX_EMAIL_RATE)
exceptions.AttributeError: Database instance has no attribute 'cleanWarnedBridges'

Looks like we meant to say cleanWarnedEmails?

Child Tickets

Change History (5)

comment:1 in reply to:  description Changed 8 years ago by aagbsn

Replying to arma:

Traceback (most recent call last):
  File "/usr/lib/python2.6/runpy.py", line 122, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.6/runpy.py", line 34, in _run_code
    exec code in run_globals
  File "/home/bridges/lib/python2.6/site-packages/TorBridgeDB.py", line 4, in <module>
    bridgedb.Main.run()
  File "/home/bridges/lib/python2.6/site-packages/bridgedb/Main.py", line 381, in run
    startup(configuration)
  File "/home/bridges/lib/python2.6/site-packages/bridgedb/Main.py", line 339, in startup
    Server.addWebServer(cfg, ipDistributor, webSchedule)
  File "/home/bridges/lib/python2.6/site-packages/bridgedb/Server.py", line 268, in addWebServer
    useRecaptcha=cfg.RECAPTCHA_ENABLED,
AttributeError: Conf instance has no attribute 'RECAPTCHA_ENABLED'

running 054560d33d74e7 with no new lines added to my config file. The fix presumably is to check if the config line is present before trying to access it. (Once I added the config line I didn't get the traceback.)

This is the same behavior as many of the other config options. The best way to solve this is to add 'smart defaults' to CONFIG_DEFAULTS in Main.py. (done)

Perhaps bridgedb should have a set of default options for most of the config options?

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/twisted/internet/base.py", line 1165, in run
    self.mainLoop()
  File "/usr/lib/python2.6/dist-packages/twisted/internet/base.py", line 1174, in mainLoop
    self.runUntilCurrent()
  File "/usr/lib/python2.6/dist-packages/twisted/internet/base.py", line 796, in runUntilCurrent
    call.func(*call.args, **call.kw)
  File "/usr/lib/python2.6/dist-packages/twisted/internet/task.py", line 194, in __call__
    d = defer.maybeDeferred(self.f, *self.a, **self.kw)
--- <exception caught here> ---
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 125, in maybeDeferred
    result = f(*args, **kw)
  File "/home/bridges/lib/python2.6/site-packages/bridgedb/Dist.py", line 299, in cleanDatabase
    db.cleanWarnedBridges(time.time()-MAX_EMAIL_RATE)
exceptions.AttributeError: Database instance has no attribute 'cleanWarnedBridges'

Looks like we meant to say cleanWarnedEmails?

That is correct, thanks!

comment:2 Changed 8 years ago by aagbsn

Cc: aagbsn@… added
Status: newneeds_review

comment:4 Changed 8 years ago by mikeperry

Cc: arma added

Bumping this as a reminder that effectively no one can merge this except arma.

comment:5 Changed 8 years ago by arma

Resolution: fixed
Status: needs_reviewclosed

merged, thanks!

Note: See TracTickets for help on using tickets.