#1951 AttributeError: 'NoneType' object has no attribute 'post_count'

v1.0.0
closed
sf-2 (994)
General
nobody
2015-08-20
2011-04-14
No

Many examples

We already "solved" this once for [#1810] by compacting tickets... but that was primarily solving the crazy numbering we had. Maybe these are additional examples of tickets with no data (created by a bug). Actually, I'm pretty sure now... iirc there were a a few projects with just a few "bad" tickets (e.g. search for tickets where summary: null) and we didn't clean those, we only cleaned the projects with huge sets of bad tickets.

Module forgetracker.tracker_main:809 in index
<<                          tool_subscribed=tool_subscribed,
                               subscribed=subscribed,
                               page=page, limit=limit, count=self.ticket.discussion_thread.post_count)
               else:
                   raise exc.HTTPNotFound, 'Ticket #%s does not exist.' % self.ticket_num
>>  page=page, limit=limit, count=self.ticket.discussion_thread.post_count)
AttributeError: 'NoneType' object has no attribute 'post_count'

Related

Tickets: #1810

Discussion

  • Dave Brondsema

    Dave Brondsema - 2011-04-14
    • size: --> 2
     
  • Jenny Steele - 2011-04-20
    • status: open --> in-progress
    • assigned_to: Jenny Steele
     
  • Jenny Steele - 2011-04-21
    • status: in-progress --> validation
    • milestone: apr-28 --> apr-21
     
  • Jenny Steele - 2011-04-21

    These tickets were possibly created after the script was run for the previous ticket. I ran the script in test mode and it sees the tickets needing cleanup correctly, so re-running the script should take care of them. We should check up on this in a week to see if more of these invalid tickets are being created or if this was just a one time thing. SOG ticket here: https://control.sog.geek.net/sog/trac/ticket/18351

     
  • Dave Brondsema

    Dave Brondsema - 2011-04-22
    • status: validation --> open
     
  • Dave Brondsema

    Dave Brondsema - 2011-04-22

    The job finished, and the hc-empyrean ticket 404s now, but necessitas still 500s. Output:

    21:15:23,504 INFO  [compact-tickets] Visiting dburi: mongodb://sfn-mongo:27017/project-data
    21:15:23,544 INFO  [compact-tickets] ... found 9 bad tickets
    21:15:23,544 INFO  [compact-tickets] ... deleting them.
    21:15:23,553 INFO  [compact-tickets] ... arduinorobotics:tickets has 1 bad tickets
    21:15:23,553 INFO  [compact-tickets] ... fixing up tickets with large ticket numbers
    21:15:23,561 INFO  [compact-tickets] ... resetting next ticket number to 0
    21:15:23,561 INFO  [compact-tickets] ... flushing ticket number changes
    21:15:23,577 INFO  [compact-tickets] ... hc-empyrean:tickets has 2 bad tickets
    21:15:23,577 INFO  [compact-tickets] ... fixing up tickets with large ticket numbers
    21:15:23,590 INFO  [compact-tickets] ... resetting next ticket number to 7
    21:15:23,590 INFO  [compact-tickets] ... flushing ticket number changes
    21:15:23,602 INFO  [compact-tickets] ... masterteses:tickets has 3 bad tickets
    21:15:23,602 INFO  [compact-tickets] ... fixing up tickets with large ticket numbers
    21:15:23,610 INFO  [compact-tickets] ... resetting next ticket number to 0
    21:15:23,610 INFO  [compact-tickets] ... flushing ticket number changes
    21:15:23,622 INFO  [compact-tickets] ... necessitas:tickets has 2 bad tickets
    21:15:23,622 INFO  [compact-tickets] ... fixing up tickets with large ticket numbers
    21:15:23,663 INFO  [compact-tickets] ... resetting next ticket number to 36
    21:15:23,663 INFO  [compact-tickets] ... flushing ticket number changes
    21:15:23,675 INFO  [compact-tickets] ... testprojq1232:tickets has 1 bad tickets
    21:15:23,675 INFO  [compact-tickets] ... fixing up tickets with large ticket numbers
    21:15:23,684 INFO  [compact-tickets] ... resetting next ticket number to 36
    21:15:23,684 INFO  [compact-tickets] ... flushing ticket number changes
    
     
  • Dave Brondsema

    Dave Brondsema - 2011-04-22
    • milestone: apr-21 --> apr-28
     
  • Jenny Steele - 2011-04-27
    • assigned_to: Jenny Steele --> Rick Copéland
     
  • Rick Copeland - 2011-04-27
    (forge)(rc/1951)
    : rick446@legolas-vm: ~/src/forge; git qa
    Todays unlucky sucker is: Jenny
    

    To QA: really, just code review -- I set up a guard for all discussion_thread accesses to lazily create the thread when it's not there (as it is not there in the links above).

     
  • Rick Copeland - 2011-04-27
    • status: open --> code-review
    • assigned_to: Rick Copéland --> Jenny Steele
     
  • Jenny Steele - 2011-04-27
    • status: code-review --> closed
     
  • Dave Brondsema

    Dave Brondsema - 2011-04-27
    • status: closed --> open
     
  • Rick Copeland - 2011-04-27
    • status: open --> validation
     
  • Rick Copeland - 2011-04-27

    That's because the code that fixes this hasn't been pushed to production yet.....

     
  • Dave Brondsema

    Dave Brondsema - 2011-04-28
    • status: validation --> closed
     

Log in to post a comment.