sch17 / ultra-finance

Automatically exported from code.google.com/p/ultra-finance
0 stars 0 forks source link

Crash on test of graphing on OSX #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Python 2.7.2, installed packages via MacPorts
2. run python examples/plotInterestHoursingStock.py 
3. Assertion failure

I'm happy to provide any info as requested; I just don't know where to start. 

....
running PlotYearlyOutputer
2011-10-04 00:22:28.719 Python[10552:2203] *** Assertion failure in 
+[NSUndoManager _endTopLevelGroupings], 
/SourceCache/Foundation/Foundation-833.1/Misc.subproj/NSUndoManager.m:324
2011-10-04 00:22:28.721 Python[10552:2203] +[NSUndoManager(NSInternal) 
_endTopLevelGroupings] is only safe to invoke on the main thread.
2011-10-04 00:22:28.723 Python[10552:2203] (
    0   CoreFoundation                      0x00007fff95e92986 __exceptionPreprocess + 198
    1   libobjc.A.dylib                     0x00007fff9342bd5e objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff95e927ba +[NSException raise:format:arguments:] + 106
    3   Foundation                          0x00007fff946d314f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 169
    4   Foundation                          0x00007fff9464235c +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 144
    5   AppKit                              0x00007fff8eeeb454 -[NSApplication run] + 589
    6   _macosx.so                          0x000000010d482f33 show + 35
    7   Python                              0x000000010b5236df PyEval_EvalFrameEx + 17087
    8   Python                              0x000000010b526cd7 PyEval_EvalCodeEx + 2103
    9   Python                              0x000000010b526e88 fast_function + 296
    10  Python                              0x000000010b523b2d PyEval_EvalFrameEx + 18189
    11  Python                              0x000000010b526cd7 PyEval_EvalCodeEx + 2103
    12  Python                              0x000000010b4b431b function_call + 347
    13  Python                              0x000000010b48bae1 PyObject_Call + 97
    14  Python                              0x000000010b49d8e7 instancemethod_call + 503
    15  Python                              0x000000010b48bae1 PyObject_Call + 97
    16  Python                              0x000000010b4e6a9e slot_tp_call + 94
    17  Python                              0x000000010b48bae1 PyObject_Call + 97
    18  Python                              0x000000010b523d45 PyEval_EvalFrameEx + 18725
    19  Python                              0x000000010b526e13 fast_function + 179
    20  Python                              0x000000010b523b2d PyEval_EvalFrameEx + 18189
    21  Python                              0x000000010b526e13 fast_function + 179
    22  Python                              0x000000010b523b2d PyEval_EvalFrameEx + 18189
    23  Python                              0x000000010b526cd7 PyEval_EvalCodeEx + 2103
    24  Python                              0x000000010b4b431b function_call + 347
    25  Python                              0x000000010b48bae1 PyObject_Call + 97
    26  Python                              0x000000010b5243ea PyEval_EvalFrameEx + 20426
    27  Python                              0x000000010b526e13 fast_function + 179
    28  Python                              0x000000010b523b2d PyEval_EvalFrameEx + 18189
    29  Python                              0x000000010b526e13 fast_function + 179
    30  Python                              0x000000010b523b2d PyEval_EvalFrameEx + 18189
    31  Python                              0x000000010b526cd7 PyEval_EvalCodeEx + 2103
    32  Python                              0x000000010b4b431b function_call + 347
    33  Python                              0x000000010b48bae1 PyObject_Call + 97
    34  Python                              0x000000010b49d8e7 instancemethod_call + 503
    35  Python                              0x000000010b48bae1 PyObject_Call + 97
    36  Python                              0x000000010b51e824 PyEval_CallObjectWithKeywords + 180
    37  Python                              0x000000010b55bdc2 t_bootstrap + 66
    38  libsystem_c.dylib                   0x00007fff959808bf _pthread_start + 335
    39  libsystem_c.dylib                   0x00007fff95983b75 thread_start + 13
)
2011-10-04 00:22:28.724 Python[10552:2203] *** Assertion failure in 
+[NSUndoManager _endTopLevelGroupings], 
/SourceCache/Foundation/Foundation-833.1/Misc.subproj/NSUndoManager.m:324
2011-10-04 00:22:28.724 Python[10552:2203] An uncaught exception was raised
2011-10-04 00:22:28.725 Python[10552:2203] +[NSUndoManager(NSInternal) 
_endTopLevelGroupings] is only safe to invoke on the main thread.
2011-10-04 00:22:28.727 Python[10552:2203] (
    0   CoreFoundation                      0x00007fff95e92986 __exceptionPreprocess + 198
    1   libobjc.A.dylib                     0x00007fff9342bd5e objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff95e927ba +[NSException raise:format:arguments:] + 106
    3   Foundation                          0x00007fff946d314f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 169
    4   Foundation                          0x00007fff9464235c +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 144
    5   AppKit                              0x00007fff8eeeb501 -[NSApplication run] + 762
    6   _macosx.so                          0x000000010d482f33 show + 35
    7   Python                              0x000000010b5236df PyEval_EvalFrameEx + 17087
    8   Python                              0x000000010b526cd7 PyEval_EvalCodeEx + 2103
    9   Python                              0x000000010b526e88 fast_function + 296
    10  Python                              0x000000010b523b2d PyEval_EvalFrameEx + 18189
    11  Python                              0x000000010b526cd7 PyEval_EvalCodeEx + 2103
    12  Python                              0x000000010b4b431b function_call + 347
    13  Python                              0x000000010b48bae1 PyObject_Call + 97
    14  Python                              0x000000010b49d8e7 instancemethod_call + 503
    15  Python                              0x000000010b48bae1 PyObject_Call + 97
    16  Python                              0x000000010b4e6a9e slot_tp_call + 94
    17  Python                              0x000000010b48bae1 PyObject_Call + 97
    18  Python                              0x000000010b523d45 PyEval_EvalFrameEx + 18725
    19  Python                              0x000000010b526e13 fast_function + 179
    20  Python                              0x000000010b523b2d PyEval_EvalFrameEx + 18189
    21  Python                              0x000000010b526e13 fast_function + 179
    22  Python                              0x000000010b523b2d PyEval_EvalFrameEx + 18189
    23  Python                              0x000000010b526cd7 PyEval_EvalCodeEx + 2103
    24  Python                              0x000000010b4b431b function_call + 347
    25  Python                              0x000000010b48bae1 PyObject_Call + 97
    26  Python                              0x000000010b5243ea PyEval_EvalFrameEx + 20426
    27  Python                              0x000000010b526e13 fast_function + 179
    28  Python                              0x000000010b523b2d PyEval_EvalFrameEx + 18189
    29  Python                              0x000000010b526e13 fast_function + 179
    30  Python                              0x000000010b523b2d PyEval_EvalFrameEx + 18189
    31  Python                              0x000000010b526cd7 PyEval_EvalCodeEx + 2103
    32  Python                              0x000000010b4b431b function_call + 347
    33  Python                              0x000000010b48bae1 PyObject_Call + 97
    34  Python                              0x000000010b49d8e7 instancemethod_call + 503
    35  Python                              0x000000010b48bae1 PyObject_Call + 97
    36  Python                              0x000000010b51e824 PyEval_CallObjectWithKeywords + 180
    37  Python                              0x000000010b55bdc2 t_bootstrap + 66
    38  libsystem_c.dylib                   0x00007fff959808bf _pthread_start + 335
    39  libsystem_c.dylib                   0x00007fff95983b75 thread_start + 13
)
2011-10-04 00:22:28.728 Python[10552:2203] *** Terminating app due to uncaught 
exception 'NSInternalInconsistencyException', reason: 
'+[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on 
the main thread.'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff95e92986 __exceptionPreprocess + 198
    1   libobjc.A.dylib                     0x00007fff9342bd5e objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff95e927ba +[NSException raise:format:arguments:] + 106
    3   Foundation                          0x00007fff946d314f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 169
    4   Foundation                          0x00007fff9464235c +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 144
    5   AppKit                              0x00007fff8eeeb501 -[NSApplication run] + 762
    6   _macosx.so                          0x000000010d482f33 show + 35
    7   Python                              0x000000010b5236df PyEval_EvalFrameEx + 17087
    8   Python                              0x000000010b526cd7 PyEval_EvalCodeEx + 2103
    9   Python                              0x000000010b526e88 fast_function + 296
    10  Python                              0x000000010b523b2d PyEval_EvalFrameEx + 18189
    11  Python                              0x000000010b526cd7 PyEval_EvalCodeEx + 2103
    12  Python                              0x000000010b4b431b function_call + 347
    13  Python                              0x000000010b48bae1 PyObject_Call + 97
    14  Python                              0x000000010b49d8e7 instancemethod_call + 503
    15  Python                              0x000000010b48bae1 PyObject_Call + 97
    16  Python                              0x000000010b4e6a9e slot_tp_call + 94
    17  Python                              0x000000010b48bae1 PyObject_Call + 97
    18  Python                              0x000000010b523d45 PyEval_EvalFrameEx + 18725
    19  Python                              0x000000010b526e13 fast_function + 179
    20  Python                              0x000000010b523b2d PyEval_EvalFrameEx + 18189
    21  Python                              0x000000010b526e13 fast_function + 179
    22  Python                              0x000000010b523b2d PyEval_EvalFrameEx + 18189
    23  Python                              0x000000010b526cd7 PyEval_EvalCodeEx + 2103
    24  Python                              0x000000010b4b431b function_call + 347
    25  Python                              0x000000010b48bae1 PyObject_Call + 97
    26  Python                              0x000000010b5243ea PyEval_EvalFrameEx + 20426
    27  Python                              0x000000010b526e13 fast_function + 179
    28  Python                              0x000000010b523b2d PyEval_EvalFrameEx + 18189
    29  Python                              0x000000010b526e13 fast_function + 179
    30  Python                              0x000000010b523b2d PyEval_EvalFrameEx + 18189
    31  Python                              0x000000010b526cd7 PyEval_EvalCodeEx + 2103
    32  Python                              0x000000010b4b431b function_call + 347
    33  Python                              0x000000010b48bae1 PyObject_Call + 97
    34  Python                              0x000000010b49d8e7 instancemethod_call + 503
    35  Python                              0x000000010b48bae1 PyObject_Call + 97
    36  Python                              0x000000010b51e824 PyEval_CallObjectWithKeywords + 180
    37  Python                              0x000000010b55bdc2 t_bootstrap + 66
    38  libsystem_c.dylib                   0x00007fff959808bf _pthread_start + 335
    39  libsystem_c.dylib                   0x00007fff95983b75 thread_start + 13
)
terminate called throwing an exceptionAbort trap: 6

Original issue reported on code.google.com by rizw...@gmail.com on 4 Oct 2011 at 7:24

GoogleCodeExporter commented 8 years ago
Attached is port list installed if it helps to know the details of the packages 
installed.

apiextractor                   @0.10.7         devel/apiextractor
apr                            @1.4.5          devel/apr
apr-util                       @1.3.12         devel/apr-util
autoconf                       @2.68           devel/autoconf
automake                       @1.11.1         devel/automake
bash-completion                @1.3            sysutils/bash-completion
bison                          @2.5            devel/bison
bzip2                          @1.0.6          archivers/bzip2
cmake                          @2.8.5          devel/cmake
ctags                          @5.8            devel/ctags
curl                           @7.22.0         net/curl
curl-ca-bundle                 @7.22.0         net/curl-ca-bundle
cyrus-sasl2                    @2.1.23         security/cyrus-sasl2
db46                           @4.6.21         databases/db46
dbus                           @1.4.12         devel/dbus
expat                          @2.0.1          textproc/expat
fftw-3                         @3.3            math/fftw-3
freetds                        @0.82           databases/freetds
freetype                       @2.4.6          print/freetype
gcc44                          @4.4.6          lang/gcc44
gcc_select                     @0.1            sysutils/gcc_select
gdbm                           @1.9.1          databases/gdbm
generatorrunner                @0.6.13         devel/generatorrunner
gettext                        @0.18.1.1       devel/gettext
git-core                       @1.7.6.4        devel/git-core
glib2                          @2.28.8         devel/glib2
gmp                            @5.0.2          devel/gmp
gnupg                          @1.4.11         mail/gnupg
gnutls                         @2.8.6          devel/gnutls
gperf                          @3.0.4          devel/gperf
gsed                           @4.2.1          textproc/gsed
hdf5-18                        @1.8.7          science/hdf5-18
help2man                       @1.40.4         textproc/help2man
icu                            @4.6.1          devel/icu
ipython_select                 @0.2            python/ipython_select
jpeg                           @8c             graphics/jpeg
jslint                         @2011-05-10     lang/jslint
lcms                           @1.19           graphics/lcms
libedit                        @20110802-3.0   devel/libedit
libgcrypt                      @1.5.0          devel/libgcrypt
libgpg-error                   @1.10           devel/libgpg-error
libiconv                       @1.14           textproc/libiconv
libidn                         @1.22           mail/libidn
libmng                         @1.0.10         graphics/libmng
libpng                         @1.4.8          graphics/libpng
libtasn1                       @2.9            devel/libtasn1
libtool                        @2.4            devel/libtool
libusb                         @1.0.8          devel/libusb
libusb-compat                  @0.1.3          devel/libusb-compat
libxml2                        @2.7.8          textproc/libxml2
libxslt                        @1.1.26         textproc/libxslt
lynx                           @2.8.7rel.1     www/lynx
lzo2                           @2.05           archivers/lzo2
m4                             @1.4.16         devel/m4
mercurial                      @1.9.1          devel/mercurial
metis                          @4.0.3          math/metis
mpfr                           @3.0.1-p3       devel/mpfr
mpg123                         @1.13.4         audio/mpg123
ncurses                        @5.9            devel/ncurses
ncursesw                       @5.8            devel/ncursesw
neon                           @0.29.6         www/neon
netcdf                         @4.1.3          science/netcdf
nspr                           @4.8.8          devel/nspr
openldap                       @2.4.21         databases/openldap
openssl                        @1.0.0e         devel/openssl
p5.12-error                    @0.170.160      perl/p5-error
p5.12-locale-gettext           @1.50.0         perl/p5-locale-gettext
pcre                           @8.12           devel/pcre
perl5                          @5.12.3         lang/perl5
perl5.12                       @5.12.3         lang/perl5.12
pkgconfig                      @0.26           devel/pkgconfig
popt                           @1.16           devel/popt
pwgen                          @2.06           sysutils/pwgen
py-distribute                  @0.6.21         python/py-distribute
py26-cython                    @0.15           python/py26-cython
py26-distribute                @0.6.21         python/py-distribute
py26-mssql                     @1.9.909        python/py27-mssql
py26-mssql                     @1.0.2          python/py26-mssql
py27-altgraph                  @0.9            python/py-altgraph
py27-bdist_mpkg                @0.4.4          python/py-bdist_mpkg
py27-beautifulsoup             @3.2.0          python/py27-beautifulsoup
py27-configobj                 @4.6.0          python/py27-configobj
py27-cython                    @0.15           python/py27-cython
py27-dateutil                  @1.5            python/py-dateutil
py27-distribute                @0.6.21         python/py-distribute
py27-docutils                  @0.8.1          python/py-docutils
py27-htmldocs                  @2.7.2          lang/py-htmldocs
py27-ipython                   @0.11           python/py-ipython
py27-jinja2                    @2.6            python/py-jinja2
py27-lint                      @0.24.0         python/py27-lint
py27-logilab-astng             @0.22.0         python/py27-logilab-astng
py27-logilab-common            @0.56.0         python/py27-logilab-common
py27-macholib                  @1.4.2          python/py-macholib
py27-markupsafe                @0.15           python/py-markupsafe
py27-matplotlib                @1.0.1          python/py-matplotlib
py27-modulegraph               @0.9.1          python/py-modulegraph
py27-mssql                     @1.9.909        python/py27-mssql
py27-nose                      @1.1.2          python/py-nose
py27-numpy                     @1.6.1          python/py-numpy
py27-pip                       @1.0.2          python/py27-pip
py27-py2app                    @0.6.3          python/py-py2app
py27-pyflakes                  @0.5.0          python/py-pyflakes
py27-pygments                  @1.4            python/py-pygments
py27-pyobjc                    @2.3            python/py27-pyobjc
py27-pyobjc-cocoa              @2.3            python/py27-pyobjc-cocoa
py27-pyqt4                     @4.8.4          python/py27-pyqt4
py27-pyside                    @1.0.7          python/py-pyside
py27-roman                     @1.4.0          python/py-roman
py27-rope                      @0.9.2          python/py27-rope
py27-scientific                @2.8            python/py27-scientific
py27-scipy                     @0.9.0          python/py-scipy
py27-shiboken                  @1.0.7          python/py-shiboken
py27-simplejson                @2.1.1          python/py27-simplejson
py27-sip                       @4.12.2         python/py27-sip
py27-sphinx                    @1.0.7          python/py27-sphinx
py27-spyder                    @2.0.12         python/py-spyder
py27-tz                        @2011j          python/py-tz
py27-xlrd                      @0.7.1          python/py-xlrd
py27-xlwt                      @0.7.2          python/py-xlwt
py27-zmq                       @2.1.9          python/py-zmq
pyflakes_select                @0.1            python/pyflakes_select
python26                       @2.6.7          lang/python26
python27                       @2.7.2          lang/python27
python_select                  @0.3            sysutils/python_select
qt4-mac                        @4.7.4          aqua/qt4-mac
readline                       @6.2.000        devel/readline
rsync                          @3.0.8          net/rsync
serf0                          @0.7.2          www/serf0
spidermonkey                   @1.7.0          lang/spidermonkey
spidermonkey                   @1.7.0          lang/spidermonkey
sqlite3                        @3.7.8          databases/sqlite3
subversion                     @1.6.17         devel/subversion
SuiteSparse                    @3.4.0          math/SuiteSparse
swig                           @2.0.4          devel/swig
swig-python                    @2.0.4          devel/swig
szip                           @2.1            archivers/szip
tiff                           @3.9.5          graphics/tiff
unixODBC                       @2.3.0          databases/unixODBC
unrar                          @4.0.7          archivers/unrar
wget                           @1.13.4         net/wget
xz                             @5.0.3          archivers/xz
zlib                           @1.2.5          archivers/zlib
zmq                            @2.1.9          sysutils/zmq

Original comment by rizw...@gmail.com on 4 Oct 2011 at 7:26

GoogleCodeExporter commented 8 years ago
Can you try python 2.6.6? I install it through Mac Port, and it works fine.

Original comment by panpandas on 8 Oct 2011 at 1:36

GoogleCodeExporter commented 8 years ago
Sure. (

I installed python and most of the dependencies via port. matplotlib installed 
with -tkinter; as tkinter and 64bit and quartz just play very badly together. 

sudo port install -f python26 py26-distribute py26-xlwt py26-xlrd 
py26-matplotlib py26-beautifulsoup py26-numpy

hbase thrift and pydispatcher come from setup.py

====

and we crash.

2011-10-07 19:33:04.750 Python[50842:2c03] *** Assertion failure in 
+[NSUndoManager _endTopLevelGroupings], 
/SourceCache/Foundation/Foundation-833.1/Misc.subproj/NSUndoManager.m:324
2011-10-07 19:33:04.751 Python[50842:2c03] +[NSUndoManager(NSInternal) 
_endTopLevelGroupings] is only safe to invoke on the main thread.
2011-10-07 19:33:04.755 Python[50842:2c03] (
0   CoreFoundation                      0x00007fff95e92986 
__exceptionPreprocess + 198
1   libobjc.A.dylib                     0x00007fff9342bd5e objc_exception_throw 
+ 43
2   CoreFoundation                      0x00007fff95e927ba +[NSException 
raise:format:arguments:] + 106
3   Foundation                          0x00007fff946d314f -[NSAssertionHandler 
handleFailureInMethod:object:file:lineNumber:description:] + 169
4   Foundation                          0x00007fff9464235c 
+[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 144
5   AppKit                              0x00007fff8eeeb454 -[NSApplication run] 
+ 589
6   _macosx.so                          0x0000000109be1f33 show + 35
7   Python                              0x0000000107b806df PyEval_EvalFrameEx + 
17087
8   Python                              0x0000000107b83cd7 PyEval_EvalCodeEx + 
2103
9   Python                              0x0000000107b83e88 fast_function + 296
10  Python                              0x0000000107b80b2d PyEval_EvalFrameEx + 
18189
11  Python                              0x0000000107b83cd7 PyEval_EvalCodeEx + 
2103
12  Python                              0x0000000107b1131b function_call + 347
13  Python                              0x0000000107ae8ae1 PyObject_Call + 97
14  Python                              0x0000000107afa8e7 instancemethod_call 
+ 503
15  Python                              0x0000000107ae8ae1 PyObject_Call + 97
16  Python                              0x0000000107b43a9e slot_tp_call + 94
17  Python                              0x0000000107ae8ae1 PyObject_Call + 97
18  Python                              0x0000000107b80d45 PyEval_EvalFrameEx + 
18725
19  Python                              0x0000000107b83e13 fast_function + 179
20  Python                              0x0000000107b80b2d PyEval_EvalFrameEx + 
18189
21  Python                              0x0000000107b83cd7 PyEval_EvalCodeEx + 
2103
22  Python                              0x0000000107b1131b function_call + 347
23  Python                              0x0000000107ae8ae1 PyObject_Call + 97
24  Python                              0x0000000107b813ea PyEval_EvalFrameEx + 
20426
25  Python                              0x0000000107b83e13 fast_function + 179
26  Python                              0x0000000107b80b2d PyEval_EvalFrameEx + 
18189
27  Python                              0x0000000107b83e13 fast_function + 179
28  Python                              0x0000000107b80b2d PyEval_EvalFrameEx + 
18189
29  Python                              0x0000000107b83cd7 PyEval_EvalCodeEx + 
2103
30  Python                              0x0000000107b1131b function_call + 347
31  Python                              0x0000000107ae8ae1 PyObject_Call + 97
32  Python                              0x0000000107afa8e7 instancemethod_call 
+ 503
33  Python                              0x0000000107ae8ae1 PyObject_Call + 97
34  Python                              0x0000000107b7b824 
PyEval_CallObjectWithKeywords + 180
35  Python                              0x0000000107bb8dc2 t_bootstrap + 66
36  libsystem_c.dylib                   0x00007fff959808bf _pthread_start + 335
37  libsystem_c.dylib                   0x00007fff95983b75 thread_start + 13
)
2011-10-07 19:33:04.756 Python[50842:2c03] *** Assertion failure in 
+[NSUndoManager _endTopLevelGroupings], 
/SourceCache/Foundation/Foundation-833.1/Misc.subproj/NSUndoManager.m:324
2011-10-07 19:33:04.756 Python[50842:2c03] An uncaught exception was raised
2011-10-07 19:33:04.757 Python[50842:2c03] +[NSUndoManager(NSInternal) 
_endTopLevelGroupings] is only safe to invoke on the main thread.
2011-10-07 19:33:04.759 Python[50842:2c03] (
0   CoreFoundation                      0x00007fff95e92986 
__exceptionPreprocess + 198
1   libobjc.A.dylib                     0x00007fff9342bd5e objc_exception_throw 
+ 43
2   CoreFoundation                      0x00007fff95e927ba +[NSException 
raise:format:arguments:] + 106
3   Foundation                          0x00007fff946d314f -[NSAssertionHandler 
handleFailureInMethod:object:file:lineNumber:description:] + 169
4   Foundation                          0x00007fff9464235c 
+[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 144
5   AppKit                              0x00007fff8eeeb501 -[NSApplication run] 
+ 762
6   _macosx.so                          0x0000000109be1f33 show + 35
7   Python                              0x0000000107b806df PyEval_EvalFrameEx + 
17087
8   Python                              0x0000000107b83cd7 PyEval_EvalCodeEx + 
2103
9   Python                              0x0000000107b83e88 fast_function + 296
10  Python                              0x0000000107b80b2d PyEval_EvalFrameEx + 
18189
11  Python                              0x0000000107b83cd7 PyEval_EvalCodeEx + 
2103
12  Python                              0x0000000107b1131b function_call + 347
13  Python                              0x0000000107ae8ae1 PyObject_Call + 97
14  Python                              0x0000000107afa8e7 instancemethod_call 
+ 503
15  Python                              0x0000000107ae8ae1 PyObject_Call + 97
16  Python                              0x0000000107b43a9e slot_tp_call + 94
17  Python                              0x0000000107ae8ae1 PyObject_Call + 97
18  Python                              0x0000000107b80d45 PyEval_EvalFrameEx + 
18725
19  Python                              0x0000000107b83e13 fast_function + 179
20  Python                              0x0000000107b80b2d PyEval_EvalFrameEx + 
18189
21  Python                              0x0000000107b83cd7 PyEval_EvalCodeEx + 
2103
22  Python                              0x0000000107b1131b function_call + 347
23  Python                              0x0000000107ae8ae1 PyObject_Call + 97
24  Python                              0x0000000107b813ea PyEval_EvalFrameEx + 
20426
25  Python                              0x0000000107b83e13 fast_function + 179
26  Python                              0x0000000107b80b2d PyEval_EvalFrameEx + 
18189
27  Python                              0x0000000107b83e13 fast_function + 179
28  Python                              0x0000000107b80b2d PyEval_EvalFrameEx + 
18189
29  Python                              0x0000000107b83cd7 PyEval_EvalCodeEx + 
2103
30  Python                              0x0000000107b1131b function_call + 347
31  Python                              0x0000000107ae8ae1 PyObject_Call + 97
32  Python                              0x0000000107afa8e7 instancemethod_call 
+ 503
33  Python                              0x0000000107ae8ae1 PyObject_Call + 97
34  Python                              0x0000000107b7b824 
PyEval_CallObjectWithKeywords + 180
35  Python                              0x0000000107bb8dc2 t_bootstrap + 66
36  libsystem_c.dylib                   0x00007fff959808bf _pthread_start + 335
37  libsystem_c.dylib                   0x00007fff95983b75 thread_start + 13
)
2011-10-07 19:33:04.759 Python[50842:2c03] *** Terminating app due to uncaught 
exception 'NSInternalInconsistencyException', reason: 
'+[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on 
the main thread.'
*** First throw call stack:
(
0   CoreFoundation                      0x00007fff95e92986 
__exceptionPreprocess + 198
1   libobjc.A.dylib                     0x00007fff9342bd5e objc_exception_throw 
+ 43
2   CoreFoundation                      0x00007fff95e927ba +[NSException 
raise:format:arguments:] + 106
3   Foundation                          0x00007fff946d314f -[NSAssertionHandler 
handleFailureInMethod:object:file:lineNumber:description:] + 169
4   Foundation                          0x00007fff9464235c 
+[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 144
5   AppKit                              0x00007fff8eeeb501 -[NSApplication run] 
+ 762
6   _macosx.so                          0x0000000109be1f33 show + 35
7   Python                              0x0000000107b806df PyEval_EvalFrameEx + 
17087
8   Python                              0x0000000107b83cd7 PyEval_EvalCodeEx + 
2103
9   Python                              0x0000000107b83e88 fast_function + 296
10  Python                              0x0000000107b80b2d PyEval_EvalFrameEx + 
18189
11  Python                              0x0000000107b83cd7 PyEval_EvalCodeEx + 
2103
12  Python                              0x0000000107b1131b function_call + 347
13  Python                              0x0000000107ae8ae1 PyObject_Call + 97
14  Python                              0x0000000107afa8e7 instancemethod_call 
+ 503
15  Python                              0x0000000107ae8ae1 PyObject_Call + 97
16  Python                              0x0000000107b43a9e slot_tp_call + 94
17  Python                              0x0000000107ae8ae1 PyObject_Call + 97
18  Python                              0x0000000107b80d45 PyEval_EvalFrameEx + 
18725
19  Python                              0x0000000107b83e13 fast_function + 179
20  Python                              0x0000000107b80b2d PyEval_EvalFrameEx + 
18189
21  Python                              0x0000000107b83cd7 PyEval_EvalCodeEx + 
2103
22  Python                              0x0000000107b1131b function_call + 347
23  Python                              0x0000000107ae8ae1 PyObject_Call + 97
24  Python                              0x0000000107b813ea PyEval_EvalFrameEx + 
20426
25  Python                              0x0000000107b83e13 fast_function + 179
26  Python                              0x0000000107b80b2d PyEval_EvalFrameEx + 
18189
27  Python                              0x0000000107b83e13 fast_function + 179
28  Python                              0x0000000107b80b2d PyEval_EvalFrameEx + 
18189
29  Python                              0x0000000107b83cd7 PyEval_EvalCodeEx + 
2103
30  Python                              0x0000000107b1131b function_call + 347
31  Python                              0x0000000107ae8ae1 PyObject_Call + 97
32  Python                              0x0000000107afa8e7 instancemethod_call 
+ 503
33  Python                              0x0000000107ae8ae1 PyObject_Call + 97
34  Python                              0x0000000107b7b824 
PyEval_CallObjectWithKeywords + 180
35  Python                              0x0000000107bb8dc2 t_bootstrap + 66
36  libsystem_c.dylib                   0x00007fff959808bf _pthread_start + 335
37  libsystem_c.dylib                   0x00007fff95983b75 thread_start + 13
)
terminate called throwing an exceptionAbort trap: 6

What variants do you have on py26-matplotlib?

Rizwan Kassim

"It's not enough to be busy, so are the ants. The question is, what are we busy 
about?" -- Thoreau
"Let yourself be silently drawn by the strange pull of what you really love" -- 
Rumi

Original comment by rizw...@gmail.com on 8 Oct 2011 at 2:34

GoogleCodeExporter commented 8 years ago
hmmm...I search on Google for "[NSUndoManager(NSInternal) 
_endTopLevelGroupings] is only safe to invoke on the main thread." Looks like 
it's related to QT. But I didn't use QT in the program. BTW, do you have xcode 
installed? How about other examples/unittest?

Original comment by panpandas on 8 Oct 2011 at 11:05

GoogleCodeExporter commented 8 years ago
I do have Xcode installed. 

py-matlibplot is using the OSX cocoa widgets.
[ rizwank@macbook ~ ] $cat ~/.matplotlib/matplotlibrc 
backend : macosx # Use native Cocoa widget, doesn't require PyGTK!
#http://matplotlib.sourceforge.net/faq/installing_faq.html#what-is-a-backend

examples/unittest doesn't exist in my checkout... 

Rizwan Kassim

"It's not enough to be busy, so are the ants. The question is, what are we busy 
about?" -- Thoreau
"Let yourself be silently drawn by the strange pull of what you really love" -- 
Rumi

Original comment by rizw...@gmail.com on 8 Oct 2011 at 11:18

GoogleCodeExporter commented 8 years ago
Can you try to run unit tests? A window should pop up and show graph from 
matlibplot. Also I saw you have py27-pyqt4 installed. If you don't need it, can 
you uninstall it and run test or example again?

~/ultra/trunk$ nosetests tests/unit/
...............................
----------------------------------------------------------------------
Ran 31 tests in 66.722s

OK

Original comment by panpandas on 9 Oct 2011 at 10:17

GoogleCodeExporter commented 8 years ago
[ rizwank@macbook ~/Documents/CodeZoo/StockScreener/ultra-finance-read-only ] 
$nosetests-2.7 -v tests/unit/
testReadExcel (tests.unit.test_excel_lib.testExcelLib) ... ok
testGetAll (tests.unit.test_google_finance.testGoogleFinance) ... ok
testGetAll_badSymbol (tests.unit.test_google_finance.testGoogleFinance) ... ok
testGetFinancials (tests.unit.test_google_finance.testGoogleFinance) ... ok
testGetHistoricalPrices (tests.unit.test_google_finance.testGoogleFinance) ... 
ok
testGetHistoricalPrices_badSymbol 
(tests.unit.test_google_finance.testGoogleFinance) ... ok
testGetTickPrices (tests.unit.test_google_finance.testGoogleFinance) ... ok
testBuildExls 
(tests.unit.test_historical_data_storage.testHistoricalDataStorage) ... ok
testBuildExlsFromFile 
(tests.unit.test_historical_data_storage.testHistoricalDataStorage) ... ok
testAttachAndUnattach (tests.unit.test_observable.testObservable) ... ok
testPlotOneDateValue 
(tests.unit.test_plot_date_value_dict.testPlotDateValueDict) ... ok
testPlotSaveFig (tests.unit.test_plot_portfolio.testPlotPortfolio) ... ok
testDontAllowArgsAfterConstruction (tests.unit.test_singleton.testSingleton) 
... ok
testDontAllowNew (tests.unit.test_singleton.testSingleton) ... ok
It's sometimes said that you can't subclass a singleton (see, for instance, ... 
ok
testInstantiateWithKeywordArg (tests.unit.test_singleton.testSingleton) ... ok
If the singleton needs args to construct, include them in the first ... ok
testMultipleGetInstancesWithArgs (tests.unit.test_singleton.testSingleton) ... 
ok
Demonstrates use with a class not defining __init__ ... ok
Make sure the test for capturing missing args doesn't interfere with a normal 
TypeError. ... ok
Demonstrates normal use -- just call getInstance and it returns a singleton 
instance ... ok
Demonstrates that singletons can ONLY be instantiated through ... ok
testTryToInstantiateWithoutNeededArgs (tests.unit.test_singleton.testSingleton) 
... ok
test_forgetAllSingletons (tests.unit.test_singleton.testSingleton) ... ok
test_forgetClassInstanceReferenceForTesting 
(tests.unit.test_singleton.testSingleton) ... ok
test_threadedCreation (tests.unit.test_singleton.testSingleton) ... ok
testMeasurement (tests.unit.test_stock_measurement.testStockMeasurement) ... ok
testAdjustFixAmountPerPeriod 
(tests.unit.test_trading_strategy_factory.testTradingStrategyFatory) ... ok
testFixAmountPerPeriod 
(tests.unit.test_trading_strategy_factory.testTradingStrategyFatory) ... ok
testFixAmountPerPeriodWithAddtionWhenDrop 
(tests.unit.test_trading_strategy_factory.testTradingStrategyFatory) ... ok
testGetHistoricalPrices (tests.unit.test_yahoo_finance.testYahooFinance) ... ok

----------------------------------------------------------------------
Ran 31 tests in 346.172s

OK

the graphs worked there -- I had to close the window manually for the first 
graph, the second disappeared without showing anything.

tests re-ran without py27-pyqt4 installed; same results.
What is your ~/.matplotlib/matplotrc looking like? 

Rizwan Kassim

"It's not enough to be busy, so are the ants. The question is, what are we busy 
about?" -- Thoreau
"Let yourself be silently drawn by the strange pull of what you really love" -- 
Rumi

Original comment by rizw...@gmail.com on 10 Oct 2011 at 3:05

GoogleCodeExporter commented 8 years ago
The first graph is designed to poped up and manually be closed.

I don't have matplotrc
$ tree ~/.matplotlib/
/Users/pan/.matplotlib/
├── fontList.cache
└── tex.cache

If you can see graph from unit tests, than it means matplotlib module is 
workfing all right. Is your graph similar to the attachment?

Original comment by panpandas on 11 Oct 2011 at 4:47

Attachments:

GoogleCodeExporter commented 8 years ago
It is. The second graph pops up and goes away though.

What rendering engine are you using for matplotlib then? What variants?

Original comment by rizw...@gmail.com on 11 Oct 2011 at 7:12

GoogleCodeExporter commented 8 years ago
I think I found the root course. check the page at:

http://root42.blogspot.com/2010/01/not-happy-with-qt-on-os-x.html

What happened is that PlotYearlyOutputer is started in another thread, which 
will cause problem on mac because it's using the Cocoa API and can only be 
started in main thread.

Then the question becomes which module is built with Cocoa API. My guess is 
py27-matplotlib. So instead of using macport, can you uninstall py27-matplotlib 
and install matplotlib manually or using easy_install?

Original comment by panpandas on 12 Oct 2011 at 1:02

GoogleCodeExporter commented 8 years ago
I see the same error on my Mac, using Python2.7. 

Original comment by G.T.Grig...@gmail.com on 9 Jul 2012 at 10:14