Closed
Bug 1121517
Opened 11 years ago
Closed 11 years ago
[mozautolog] "NameError: global name 'json' is not defined" in _add_doc(), mozautolog/buildlog.py line 57
Categories
(Tree Management Graveyard :: OrangeFactor, defect)
Tree Management Graveyard
OrangeFactor
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: emorley)
References
Details
Attachments
(1 file)
|
693 bytes,
text/plain
|
Details |
Spotted in bug 1121507.
Fixing this will let us see the real error.
2015-01-14 07:48:06,402 - BuildLogMonitor - ERROR - global name 'json' is not defined
Traceback (most recent call last):
File "/home/webtools/apps/logparser/src/logparser/logparser/savelogs.py", line 64, in parse
lp.parseFiles()
File "/home/webtools/apps/logparser/src/logparser/logparser/logparser.py", line 106, in parseFiles
self.postResultsToElasticSearch(testdata)
File "/home/webtools/apps/logparser/src/logparser/logparser/logparser.py", line 198, in postResultsToElasticSearch
self._post_buildlog_to_elasticsearch(data)
File "/home/webtools/apps/logparser/src/logparser/logparser/logparser.py", line 190, in _post_buildlog_to_elasticsearch
AutologBuildLog(index='logs', server=server, **postdata).submit()
File "/home/webtools/apps/logparser/src/mozautolog/mozautolog/buildlog.py", line 87, in submit
build_id = self._add_doc(json, self.doc_type, self.id)
File "/home/webtools/apps/logparser/src/mozautolog/mozautolog/buildlog.py", line 57, in _add_doc
raise Exception(json.dumps(result))
NameError: global name 'json' is not defined
https://hg.mozilla.org/automation/mozautolog/file/f29f2732033c/mozautolog/buildlog.py#l57
| Assignee | ||
Comment 1•11 years ago
|
||
| Assignee | ||
Comment 2•11 years ago
|
||
When trying to update mozautolog on orangefactor1, I found that the hgrc still referenced the old location, and it was quite out of date, eg:
(logparser)[webtools@orangefactor1.dmz.phx1 mozautolog]$ hg inc
warning: hg.mozilla.org certificate with fingerprint af:27:b9:34:47:4e:e5:98:01:f6:83:2b:51:c9:aa:d8:df:fb:1a:27 not verified (check hostfingerprints or web.cacerts config setting)
comparing with https://hg.mozilla.org/automation/mozautolog
searching for changes
changeset: 47:1fb81826ab0c
user: Jonathan Griffin <jgriffin@<snip>.com>
date: Thu Feb 09 14:34:35 2012 -0800
summary: Bug 725710 - add optional yaml support, r=jhammel
changeset: 48:ccbbea99ccdc
user: Jonathan Griffin <jgriffin@<snip>.com>
date: Thu Feb 09 14:35:36 2012 -0800
summary: Bug 725710 - remove 'import json' from top of file
changeset: 49:812d4cbb21c0
user: Jonathan Griffin <jgriffin@<snip>.com>
date: Wed Feb 29 10:27:07 2012 -0800
summary: Update repo location
changeset: 50:9312671f276a
user: Jonathan Griffin <jgriffin@<snip>.com>
date: Mon Apr 23 15:05:38 2012 -0700
summary: Update ES address
changeset: 51:9ce64c96dae2
user: Jonathan Griffin <jgriffin@<snip>.com>
date: Mon Apr 23 15:06:17 2012 -0700
summary: Bump version
changeset: 52:20615f9d7867
user: Jonathan Griffin <jgriffin@<snip>.com>
date: Tue Jun 05 15:51:37 2012 -0700
summary: Handle unicode conversion in log file handling
changeset: 53:df09d85e4935
user: Jonathan Griffin <jgriffin@<snip>.com>
date: Thu Jun 07 18:19:51 2012 -0700
summary: Rev version
changeset: 54:5bd020decef4
user: Mihnea Dobrescu-Balaur <mbalaur@<snip>.com>
date: Fri Aug 17 15:32:36 2012 -0700
summary: Bug 782848 - Add serialize method, r=jgriffin
changeset: 55:f29f2732033c
user: Jonathan Griffin <jgriffin@<snip>.com>
date: Fri May 17 12:57:06 2013 -0700
summary: Bug 873627 - Update default ES to IT production cluster, r=mcote
changeset: 56:e91a41770268
tag: tip
user: Ed Morley <emorley@<snip>.com>
date: Wed Jan 14 16:24:04 2015 +0000
summary: Bug 1121517 - Fix "NameError: global name 'json' is not defined" exception
I've updated the repo, and ran a |python setup.py develop|.
I also updated mozautoeslib whilst I was there, since it was behind too:
(logparser)[webtools@orangefactor1.dmz.phx1 mozautoeslib]$ hg inc
comparing with http://hg.mozilla.org/automation/mozautoeslib/
searching for changes
changeset: 43:3ac949ff4d6b
user: Jonathan Griffin <jgriffin@mozilla.com>
date: Thu Feb 09 17:35:45 2012 -0800
summary: Bump pyes version to 0.16
changeset: 44:8f466f97ac6e
user: Jonathan Griffin <jgriffin@mozilla.com>
date: Mon Apr 23 15:08:50 2012 -0700
summary: Update ES address in example.py
changeset: 45:07b895dd4770
tag: tip
user: Jonathan Griffin <jgriffin@mozilla.com>
date: Tue Feb 19 16:24:17 2013 -0800
summary: Bump version number
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Product: Tree Management → Tree Management Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•