where = sqlalchemy.and_(document_table.columns.section == \
                      parameters[0], document_table.columns.html_name == \
                      parameters[1])
                    counter_results = document_table.select(where).execute()
                    fetched = counter_results.fetchone()
                    debug_log("Fetched: " + \                       fetched[document_table.columns.html_name])
                    tokens = fetched["tokens_original"]
                    return document.get_excerpts(factory.get_query(query_string,                      criteria), limit, tokens)

and

                    where = sqlalchemy.and_(document_table.columns.section == \
                      parameters[0], document_table.columns.html_name == \
                      parameters[1])
                    counter_results = document_table.select(where).execute()
                    fetched = counter_results.fetchone()
                    debug_log("Fetched: " + \                       fetched["html_name"])
                    tokens = fetched["tokens_original"]
                    return document.get_excerpts(factory.get_query(query_string,                      criteria), limit, tokens)

and

                    where = sqlalchemy.and_(document_table.columns.section == \
                      parameters[0], document_table.columns.html_name == \
                      parameters[1])
                    counter_results = document_table.select(where).execute()
                    fetched = counter_results.fetchone()
                    debug_log("Fetched: " + \                       fetched[3])
                    tokens = fetched["tokens_original"]
                    return document.get_excerpts(factory.get_query(query_string,                      criteria), limit, tokens)

both give an error like:

Traceback (most recent call last):
  File "/server1/users/jonathan/creations/inventions/software/insight/alchemy", line 5930, in ?
    multitasking.start_oracle()
  File "/server1/users/jonathan/creations/inventions/software/insight/alchemy", line 3547, in start_oracle
    self.run_oracle()
  File "/server1/users/jonathan/creations/inventions/software/insight/alchemy", line 3508, in run_oracle
    self.handle_oracle_query(newsocket, address)
  File "/server1/users/jonathan/creations/inventions/software/insight/alchemy", line 3455, in handle_oracle_query
    generate_output()
  File "/server1/users/jonathan/creations/inventions/software/insight/alchemy", line 5245, in generate_output
    current_frame.display()
  File "/server1/users/jonathan/creations/inventions/software/insight/alchemy", line 2827, in display
    build_output_for_appropriate_search_results()
  File "/server1/users/jonathan/creations/inventions/software/insight/alchemy", line 4731, in build_output_for_appropriate_search_results
    build_output_for_search_result(current_result, query)
  File "/server1/users/jonathan/creations/inventions/software/insight/alchemy", line 4785, in build_output_for_search_result
    ""), criteria)
  File "/server1/users/jonathan/creations/inventions/software/insight/alchemy", line 502, in get_excerpts
    (get_cgi("section_to_search", get_default_section()), document, \
  File "/server1/users/jonathan/creations/inventions/software/insight/alchemy", line 523, in get_information
    parameters)
  File "/server1/users/jonathan/creations/inventions/software/insight/alchemy", line 552, in get_information_internal
    debug_log("Fetched: " + \
TypeError: unsubscriptable object

I had tried other things, i.e. fetched.html_name or fetched.columns.html_name, based on the documentation under class ResultProxy.

How can I retrieve columns from what a fetchone() returns?

--
++ Jonathan Hayward, [EMAIL PROTECTED]
** To see an award-winning website with stories, essays, artwork,
** games, and a four-dimensional maze, why not visit my home page?
** All of this is waiting for you at http://JonathansCorner.com

** If you'd like a Google Mail (gmail.com) account, please tell me!

Reply via email to