Closed Bug 741084 Opened 13 years ago Closed 13 years ago

[SeaMonkey, OSX 10.5] "[testharnessreport.js] Error 1" due to "ImportError: No module named simplejson"

Categories

(SeaMonkey :: Release Engineering, defect, P1)

x86
macOS
defect

Tracking

(seamonkey2.11 verified)

VERIFIED FIXED
seamonkey2.12
Tracking Status
seamonkey2.11 --- verified

People

(Reporter: sgautherie, Assigned: ewong)

References

Details

(Keywords: dev-doc-needed, regression, Whiteboard: [d-d-n: see comment 7])

http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1333106833.1333108072.9520.gz
OS X 10.5 comm-central-trunk leak test build on 2012/03/30 04:27:13
+
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1333136368.1333139702.16952.gz
OS X 10.5 comm-central-trunk leak test build on 2012/03/30 12:39:28
+
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1333166067.1333166323.10190.gz
OS X 10.5 comm-central-trunk leak test build on 2012/03/30 20:54:27
{
Traceback (most recent call last):
  File "/builds/slave/comm-cen-trunk-osx-dbg/build/mozilla/config/pythonpath.py", line 52, in <module>
    main(sys.argv[1:])
  File "/builds/slave/comm-cen-trunk-osx-dbg/build/mozilla/config/pythonpath.py", line 44, in main
    execfile(script, frozenglobals)
  File "/builds/slave/comm-cen-trunk-osx-dbg/build/mozilla/dom/tests/mochitest/w3c/writeReporter.py", line 12, in <module>
    import simplejson as json
ImportError: No module named simplejson
make[8]: *** [testharnessreport.js] Error 1
}
Do you know what range this happened in, is it only trunk, etc?

I can figure this out, but afaik we shouldn't ever *require* simplejson (if json itself is importable)
(In reply to Justin Wood (:Callek) from comment #1)

> Do you know what range this happened in, is it only trunk, etc?

Bug 647323:
https://hg.mozilla.org/mozilla-central/rev/bb0cc19274c5
{
    10.3 +++ b/dom/tests/mochitest/w3c/writeReporter.py

   10.13 +try:
   10.14 +  import json
   10.15 +except ImportError:
   10.16 +  import simplejson as json
}

> I can figure this out, but afaik we shouldn't ever *require* simplejson (if
> json itself is importable)

It looks like json isn't found either :-|
Same error is reported for WINNT 5.2 comm-central lightning nightly build on http://tinderbox.mozilla.org/showbuilds.cgi?tree=CalendarTrunk
(In reply to Stefan Sitter from comment #3)
> Same error is reported for WINNT 5.2 comm-central lightning nightly build on
> http://tinderbox.mozilla.org/showbuilds.cgi?tree=CalendarTrunk

Indeed, Windows lightning boxes are affected too,
yet you should file a separate bug, as admin teams are separate.

*****

http://docs.python.org/library/json.html
"New in version 2.6."

I would guess the python version is too old on all these boxes...
will wait on this bug to be resolved for lightning on thunderbird 14.x
This bug is for SeaMonkey. The Lightning build servers will be tracked with bug 742375.
This same bug also exists in Firefox.

I was able to work around it by installing simplejson 2.5.0 (http://pypi.python.org/pypi/simplejson/).  I didn't have to upgrade Python from the OS-provided version 2.5.

We should probably update our list of build prerequisites accordingly (https://developer.mozilla.org/En/Developer_Guide/Build_Instructions/Mac_OS_X_Prerequisites).
(In reply to Steven Michaud from comment #7)
> This same bug also exists in Firefox.

Could be indeed.

Ftr,

http://mxr.mozilla.org/mozilla-central/source/configure.in
{
120 PYTHON_VERSION=2.5

2088 dnl We require version 2.5 or newer of Python to build.
2089 AC_MSG_CHECKING([for Python version >= $PYTHON_VERSION but not 3.x])
}
+
https://developer.mozilla.org/en/Compare-locales
{
Note that recent versions require a recent version of python including json, or the simplejson module to work. You can install it by running easy_install, or install python-simplejson package if you are running a Debian-based system (recommended).
}

Ted, it seems we need to either:
*Require python 2.6+ (or 2.5 + simplejson).
 (I don't expect that just for this bug, but maybe that would be wanted for other reasons.)
*Bundle simplejson in-tree.
*Make /dom/tests/mochitest/w3c/writeReporter.py (or before) catch the error gracefully and hint at the solution.
We have plans to require Python 2.7 soon, but I don't know how soon. If something in-tree requires >2.5, that's a bug right now.
Actually the patch for bug 647323 doesn't require Python 2.6 (on any platform as far as I know).  But on Python 2.5 it does require a package (simplejson) that's neither bundled nor in our documented list of build prerequisites.
Target Milestone: seamonkey2.11 → ---
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey-Aurora/1335323102.1335328288.2171.gz
OS X 10.5 comm-aurora leak test build on 2012/04/24 20:05:02
s: cb-sea-miniosx01
Last failure:
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1337361214.1337361422.2488.gz
OS X 10.5 comm-central-trunk leak test build on 2012/05/18 10:13:34
s: cb-sea-miniosx01
{
make[6]: *** [testharnessreport.js] Error 1
}

First success:
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1337363135.1337375454.16058.gz
OS X 10.5 comm-central-trunk leak test build on 2012/05/18 10:45:35
s: cb-sea-miniosx01
(In reply to Serge Gautherie (:sgautherie) from comment #12)

> Last failure:

http://hg.mozilla.org/mozilla-central/rev/3b86eaa02d91

> First success:

http://hg.mozilla.org/mozilla-central/rev/17422a2d0c70
Assignee: nobody → ewong
Status: NEW → ASSIGNED
I think I fixed this, but I'm leaving this bug open until I see it green 
from this (http://hg.mozilla.org/mozilla-central/rev/17422a2d0c70 ) onwards
(barring other issues, of course).
This looks like it's fixed.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
No longer depends on: 647323
Resolution: --- → FIXED
(In reply to Edmund Wong (:ewong) from comment #14)

> I think I fixed this

Ftr, how did you fix this?

V.Fixed

***

http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey-Aurora/1337463645.1337464106.23691.gz
OS X 10.5 comm-aurora leak test build on 2012/05/19 14:40:45  
s: cb-sea-miniosx01

It looks like SM 2.11a2 may still be affected
Status: RESOLVED → VERIFIED
Flags: in-testsuite-
Target Milestone: --- → seamonkey2.12
Blocks: 647323
Keywords: regression
Keywords: dev-doc-needed
Whiteboard: [d-d-n: see comment 7]
FTR,  

I got simplejson-2.1.1-py25.dmg from nthomas.

Then I ssh'd into cb-sea-miniosx01 and did the following:

1) hdiutil mount simplejson-2.1.1-py25.dmg
2) sudo cp -R /Volumes/Mozilla\ simplejson-2.1.1-py25 /Applications
3) *waited a bit*
4) hdiutil unmount "/Volumes/Mozilla\ simplejson-2.1.1-py25"
(In reply to Serge Gautherie (:sgautherie) from comment #16)
> It looks like SM 2.11a2 may still be affected

http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey-Aurora/1337594449.1337596373.23950.gz
OS X 10.5 comm-aurora leak test build on 2012/05/21 03:00:49
s: cb-sea-miniosx01

Still affected indeed :-/
I'm reopening this and assigning to myself.  I've done the following and
am waiting for the next Aurora push.

cb-sea-miniosx01:~ seabld$ sudo installer -pkg /Applications/simplejson-2.1.1-pkg -target /
installer: Package name is magic
installer: Installing at base path /
installer: The install was successful.
cb-sea-miniosx01:~ seabld$

Maybe this will work better.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → ASSIGNED
http://tinderbox.mozilla.org/SeaMonkey-Aurora/
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey-Aurora/1337779371.1337789533.28960.gz
OS X 10.5 comm-aurora leak test build on 2012/05/23 06:22:51
s: cb-sea-miniosx01

seamonkey2.11a2: verified.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.