Skip to content

mmirs_qrp: python 3 compatibility #30

@astrochun

Description

@astrochun

Some basic fixes where implemented to work with python 3.

The first is removing one print statement. Another is integer vs float for i_sky. Finally, yaml may not be installed, so I included a try/except to handle this. However, when I ran it through with py3, I got the following information dump:

2019-09-22 13:50:14.029 python[23159:5331064] -[NSApplication _setup:]: unrecognized selector sent to instance 0x7fdf5aed8820
2019-09-22 13:50:14.034 python[23159:5331064] An uncaught exception was raised
2019-09-22 13:50:14.034 python[23159:5331064] -[NSApplication _setup:]: unrecognized selector sent to instance 0x7fdf5aed8820
2019-09-22 13:50:14.034 python[23159:5331064] (
0 CoreFoundation 0x00007fff999b6452 __exceptionPreprocess + 178
1 libobjc.A.dylib 0x00007fff953dd73c objc_exception_throw + 48
2 CoreFoundation 0x00007fff99a2018d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00007fff999264c1 forwarding + 1009
4 CoreFoundation 0x00007fff99926048 _CF_forwarding_prep_0 + 120
5 libtk8.6.dylib 0x0000000b1705e31d TkpInit + 413
6 libtk8.6.dylib 0x0000000b16fb617e Initialize + 2622
7 _tkinter.cpython-36m-darwin.so 0x0000000b16ddea16 _tkinter_create + 1174
8 python 0x0000000102144068 _PyCFunction_FastCallDict + 200
9 python 0x000000010221961f call_function + 143
10 python 0x0000000102217175 _PyEval_EvalFrameDefault + 46837
11 python 0x000000010220a8c9 _PyEval_EvalCodeWithName + 425
12 python 0x000000010221a2cc _PyFunction_FastCallDict + 364
13 python 0x00000001020c2f80 _PyObject_FastCallDict + 320
14 python 0x00000001020ea5f8 method_call + 136
15 python 0x00000001020ca5ce PyObject_Call + 62
16 python 0x000000010216b5b5 slot_tp_init + 117
17 python 0x000000010216faf1 type_call + 241
18 python 0x00000001020c2ef1 _PyObject_FastCallDict + 177
19 python 0x00000001020cb137 _PyObject_FastCallKeywords + 327
20 python 0x0000000102219718 call_function + 392
21 python 0x0000000102217225 _PyEval_EvalFrameDefault + 47013
22 python 0x00000001022199dc fast_function + 188
23 python 0x000000010221967c call_function + 236
24 python 0x0000000102217175 _PyEval_EvalFrameDefault + 46837
25 python 0x000000010220a8c9 _PyEval_EvalCodeWithName + 425
26 python 0x000000010221a2cc _PyFunction_FastCallDict + 364
27 python 0x00000001020c2f80 _PyObject_FastCallDict + 320
28 python 0x00000001020ea5f8 method_call + 136
29 python 0x00000001020ca5ce PyObject_Call + 62
30 python 0x0000000102217376 _PyEval_EvalFrameDefault + 47350
31 python 0x000000010220a8c9 _PyEval_EvalCodeWithName + 425
32 python 0x000000010210d92d function_call + 125
33 python 0x00000001020ca5ce PyObject_Call + 62
34 python 0x0000000102217376 _PyEval_EvalFrameDefault + 47350
35 python 0x000000010220a8c9 _PyEval_EvalCodeWithName + 425
36 python 0x0000000102219a8a fast_function + 362
37 python 0x000000010221967c call_function + 236
38 python 0x0000000102217175 _PyEval_EvalFrameDefault + 46837
39 python 0x000000010220a8c9 _PyEval_EvalCodeWithName + 425
40 python 0x0000000102219a8a fast_function + 362
41 python 0x000000010221967c call_function + 236
42 python 0x0000000102217225 _PyEval_EvalFrameDefault + 47013
43 python 0x000000010220a8c9 _PyEval_EvalCodeWithName + 425
44 python 0x000000010226355c PyRun_FileExFlags + 252
45 python 0x0000000102262a34 PyRun_SimpleFileExFlags + 372
46 python 0x00000001022897c6 Py_Main + 3734
47 python 0x00000001020baf59 main + 313
48 libdyld.dylib 0x00007fff9112c5ad start + 1
49 ??? 0x0000000000000002 0x0 + 2
)
2019-09-22 13:50:14.035 python[23159:5331064] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSApplication _setup:]: unrecognized selector sent to instance 0x7fdf5aed8820'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff999b6452 __exceptionPreprocess + 178
1 libobjc.A.dylib 0x00007fff953dd73c objc_exception_throw + 48
2 CoreFoundation 0x00007fff99a2018d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00007fff999264c1 forwarding + 1009
4 CoreFoundation 0x00007fff99926048 _CF_forwarding_prep_0 + 120
5 libtk8.6.dylib 0x0000000b1705e31d TkpInit + 413
6 libtk8.6.dylib 0x0000000b16fb617e Initialize + 2622
7 _tkinter.cpython-36m-darwin.so 0x0000000b16ddea16 _tkinter_create + 1174
8 python 0x0000000102144068 _PyCFunction_FastCallDict + 200
9 python 0x000000010221961f call_function + 143
10 python 0x0000000102217175 _PyEval_EvalFrameDefault + 46837
11 python 0x000000010220a8c9 _PyEval_EvalCodeWithName + 425
12 python 0x000000010221a2cc _PyFunction_FastCallDict + 364
13 python 0x00000001020c2f80 _PyObject_FastCallDict + 320
14 python 0x00000001020ea5f8 method_call + 136
15 python 0x00000001020ca5ce PyObject_Call + 62
16 python 0x000000010216b5b5 slot_tp_init + 117
17 python 0x000000010216faf1 type_call + 241
18 python 0x00000001020c2ef1 _PyObject_FastCallDict + 177
19 python 0x00000001020cb137 _PyObject_FastCallKeywords + 327
20 python 0x0000000102219718 call_function + 392
21 python 0x0000000102217225 _PyEval_EvalFrameDefault + 47013
22 python 0x00000001022199dc fast_function + 188
23 python 0x000000010221967c call_function + 236
24 python 0x0000000102217175 _PyEval_EvalFrameDefault + 46837
25 python 0x000000010220a8c9 _PyEval_EvalCodeWithName + 425
26 python 0x000000010221a2cc _PyFunction_FastCallDict + 364
27 python 0x00000001020c2f80 _PyObject_FastCallDict + 320
28 python 0x00000001020ea5f8 method_call + 136
29 python 0x00000001020ca5ce PyObject_Call + 62
30 python 0x0000000102217376 _PyEval_EvalFrameDefault + 47350
31 python 0x000000010220a8c9 _PyEval_EvalCodeWithName + 425
32 python 0x000000010210d92d function_call + 125
33 python 0x00000001020ca5ce PyObject_Call + 62
34 python 0x0000000102217376 _PyEval_EvalFrameDefault + 47350
35 python 0x000000010220a8c9 _PyEval_EvalCodeWithName + 425
36 python 0x0000000102219a8a fast_function + 362
37 python 0x000000010221967c call_function + 236
38 python 0x0000000102217175 _PyEval_EvalFrameDefault + 46837
39 python 0x000000010220a8c9 _PyEval_EvalCodeWithName + 425
40 python 0x0000000102219a8a fast_function + 362
41 python 0x000000010221967c call_function + 236
42 python 0x0000000102217225 _PyEval_EvalFrameDefault + 47013
43 python 0x000000010220a8c9 _PyEval_EvalCodeWithName + 425
44 python 0x000000010226355c PyRun_FileExFlags + 252
45 python 0x0000000102262a34 PyRun_SimpleFileExFlags + 372
46 python 0x00000001022897c6 Py_Main + 3734
47 python 0x00000001020baf59 main + 313
48 libdyld.dylib 0x00007fff9112c5ad start + 1
49 ??? 0x0000000000000002 0x0 + 2
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions