GithubHelp home page GithubHelp logo

semuconsulting / pygpsclient Goto Github PK

View Code? Open in Web Editor NEW
453.0 14.0 90.0 85.17 MB

Python Graphical GPS Client Application supporting NMEA, UBX, RTCM3, NTRIP & SPARTN Protocols

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
gps gps-location gps-data ubx-gps-library gnss gnsstoolkit ubx-protocols ubx-configuration-dialog ubx nmea

pygpsclient's People

Contributors

nicholaszolton avatar nmichaels-qualinx avatar semuadmin avatar semudev2 avatar williangalvani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pygpsclient's Issues

Starting gui fails on Windows 10

λ pip freeze | grep gps
pygpsclient==1.3.26
pynmeagps==1.0.23

  λ pygpsclient
Traceback (most recent call last):
  File "C:\Python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python37\Scripts\pygpsclient.exe\__main__.py", line 4, in <module>
  File "C:\Python37\lib\site-packages\pygpsclient\__main__.py", line 16, in <module>
    from pygpsclient.app import App
  File "C:\Python37\lib\site-packages\pygpsclient\app.py", line 17, in <module>
    from pygnssutils import GNSSMQTTClient, GNSSNTRIPClient
  File "C:\Python37\lib\site-packages\pygnssutils\__init__.py", line 13, in <module>
    from pygnssutils.gnssmqttclient import GNSSMQTTClient
  File "C:\Python37\lib\site-packages\pygnssutils\gnssmqttclient.py", line 34, in <module>
    import paho.mqtt.client as mqtt
  File "C:\Python37\lib\site-packages\paho\mqtt\client.py", line 116, in <module>
    import dns.resolver
  File "C:\Python37\lib\site-packages\dns\resolver.py", line 38, in <module>
    import dns.query
  File "C:\Python37\lib\site-packages\dns\query.py", line 43, in <module>
    from requests_toolbelt.adapters.source import SourceAddressAdapter
  File "C:\Python37\lib\site-packages\requests_toolbelt\__init__.py", line 12, in <module>
    from .adapters import SSLAdapter, SourceAddressAdapter
  File "C:\Python37\lib\site-packages\requests_toolbelt\adapters\__init__.py", line 12, in <module>
    from .ssl import SSLAdapter
  File "C:\Python37\lib\site-packages\requests_toolbelt\adapters\ssl.py", line 16, in <module>
    from .._compat import poolmanager
  File "C:\Python37\lib\site-packages\requests_toolbelt\_compat.py", line 56, in <module>
    from requests.packages.urllib3.contrib.pyopenssl \
  File "C:\Python37\lib\site-packages\urllib3\contrib\pyopenssl.py", line 50, in <module>
    import OpenSSL.SSL
  File "C:\Python37\lib\site-packages\OpenSSL\__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "C:\Python37\lib\site-packages\OpenSSL\crypto.py", line 1579, in <module>
    class X509StoreFlags(object):
  File "C:\Python37\lib\site-packages\OpenSSL\crypto.py", line 1598, in X509StoreFlags
    NOTIFY_POLICY = _lib.X509_V_FLAG_NOTIFY_POLICY
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_NOTIFY_POLICY'

UI text unreadable in MacOS with Dark theme

pygpsclient 1.3.20
MacOs Ventura 13.2.1 (22D68)

When Dark theme in MacOS is enabled, the text in inputboxes and lists is unreadable (same FG and BG color)

This is not the issue with Light theme:

I'm getting a KeyError: 'serial_settings' from stream_handler.py when trying to use a socket as gnss source. Approx line 124 but I may have added some debug prints.

I'm getting a KeyError: 'serial_settings' from stream_handler.py when trying to use a socket as gnss source. Approx line 124 but I may have added some debug prints.

The problem seems to be that the access of settings["serial_settings"] has been moved from within the CONNECTED-specific code up a few lines. I'm guessing that when conntype is CONNECTED_SOCKET, settings doesn't have any "serial_settings".

Looks like it happened in 42e2ae0 "Merge branch 'ubx_simulation' into RC-1.4.10 "

Originally posted by @divenal in #118

socket.timeout: timed out

Hi,
Every time I connect to a NTRIP server through the NTRIP Client Configuration, I get something called 'socket.timeout: timed out.' Is this expected? Or is something going wrong?

Really appreciate any help!

Support Ublox NTRIP Client (No MQTT) SPARTN format

PyGPSClient Feature Request Template

Ublox/Thingstream released a new service based on NTRIP/IP and providing SPARTN format corrections without any MQTT dependencies.

Wondering if this application can add this feature and provide a server for it to connect and retrieve those corrections

Error in _process_UBX03() function when handling satellite elevation and azimuth

PyGPSClient Bug Report Template

(Reported via email by Matti Öhman)

one more thing: the Satellite (Sky) view oscillates between two different states when both GPGSV and PUBX03 (UBX03) are enabled:

This seems bad:
image1

... while this looks OK:
image2

The parsed data seems to be valid, so the problem is probably in the _process_UBX03() funcion (nmea_handler.py).

The function makes a dictionary of tuples:
gsv_dict[key] = (
gnss,
svid,
getattr(data, f"azi_{i+1:02}"),
getattr(data, f"ele_{i+1:02}"),
str(getattr(data, f"cno_{i+1:02}")),
now,
)

Later it moves the tuples around:
for key in gsv_dict:
self.gsv_log[key] = gsv_dict[key]

... and unpacks the tuples back into variables:
for key in self.gsv_log:
gnssId, svid, elev, azim, snr, lastupdate = self.gsv_log[key]

The 3rd and 4th fields are swapped, i.e. the elevation and azimuth have switched places!

It might be useful to have an assert statement to check that a satellite's elevation never exceeds 90 degrees.

Additional context

Add any other context about the problem here.

ValueError if pygpsclient starts without default configuration file

Describe the bug

A clear and concise description of what the bug is.

pygpsclient v1.3.23 returns an error on start if there's no default configuration file:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/bin/pygpsclient", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pygpsclient/__main__.py", line 47, in main
    App(root, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pygpsclient/app.py", line 185, in __init__
    _, self.config = self.file_handler.load_config(configfile)
    ^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 2)

To Reproduce

Steps to reproduce the behaviour:

  • Remove any existing pygpsclient.json file from user's home directory.
  • Start pygpsclient

Expected Behaviour

No error, continues with default hard-coded configuration.

Pygpsclient crashes when "save configuration" on macos

PyGPSClient Bug Report Template

Describe the bug
I tried several times,
but as soon as I ask to save configuration, PYGPSClient crashes immediately

I was connected with serial port with the following configuration

Process: python3.10 [23489]
Path: /Users/USER/*/python
Identifier: python3.10
Version: ???
Code Type: ARM-64 (Native)
Parent Process: zsh [4478]
Responsible: Terminal [4934]
User ID: 502
Date/Time: 2023-12-28 21:59:02.3466 +0100
OS Version: macOS 12.7 (21G816)
Model: MacBookPro18,2, BootROM 10151.1.1, proc 10:8:2 processors, 64 GB, SMC
Graphics: Apple M1 Max, Apple M1 Max, Built-In
Display: DELL UP3216Q, 6016 x 3384, Main, MirrorOff, Online
Display: Color LCD, 3456 x 2234 Retina, MirrorOff, Online
Memory Module: LPDDR5
AirPort: Wi-Fi, wl0: Apr 6 2022 05:55:54 version 20.90.45.0.8.7.118 FWID 01-e7138ff2
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB31Bus
USB Device: USB3.0 Hub
USB Device: USB3.1 Hub
USB Device: AX88179A
USB Device: USB2.0 Hub
USB Device: USB2.1 Hub
USB Device: USB 2.0 Hub
USB Device: FT232R USB UART
USB Device: USB Mouse
USB Device: USB Billboard Device
USB Device: USB31Bus
USB Device: USB31Bus
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Device: WD19TB Thunderbolt Dock, Dell, 1, 60.60

pygpsclient 1.4.6

Translated Report (Full Report Below)

Process: python3.10 [23489]
Path: /Users/USER/*/python
Identifier: python3.10
Version: ???
Code Type: ARM-64 (Native)
Parent Process: zsh [4478]
Responsible: Terminal [4934]
User ID: 502

Date/Time: 2023-12-28 21:59:02.3466 +0100
OS Version: macOS 12.7 (21G816)
Report Version: 12
Anonymous UUID: ED00EC5F-84FF-208C-8B11-D7D296943ACF

Sleep/Wake UUID: 5E1BCE4F-9D11-41EE-A854-528A5218764D

Time Awake Since Boot: 2000000 seconds
Time Since Wake: 547106 seconds

System Integrity Protection: disabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process: exc handler [23489]

VM Region Info: 0 is not in any region. Bytes before following region: 4375855104
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 104d24000-105034000 [ 3136K] r-x/r-x SM=COW .../*/python3.10

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 ??? 0x0 ???
1 libdispatch.dylib 0x1ae9581b4 _dispatch_client_callout + 20
2 libdispatch.dylib 0x1ae959a34 _dispatch_once_callout + 32
3 ImageIO 0x1b7b83c78 TIFFWritePlugin::writeAll() + 80
4 ImageIO 0x1b7b83be0 IIO_Writer_TIFF::write(void*, void*) + 36
5 ImageIO 0x1b7c4e0f0 IIOImageDestination::finalizeDestination() + 592
6 ImageIO 0x1b7b83a6c CGImageDestinationFinalize + 132
7 AppKit 0x1b19cbd3c +[NSBitmapImageRep(NSBitmapImageFileTypeExtensions) representationOfImageRepsInArray:usingType:properties:] + 2048
8 AppKit 0x1b1ba7f38 -[NSBitmapImageRep TIFFRepresentation] + 76
9 AppKit 0x1b1ba711c -[NSBitmapImageRep encodeWithCoder:] + 44
10 Foundation 0x1afa87cfc -[NSXPCEncoder _encodeObject:] + 520
11 Foundation 0x1afa8d0b4 _NSXPCSerializationAddInvocationWithOnlyObjectArgumentsArray + 120
12 Foundation 0x1afa8cf60 -[NSXPCEncoder _encodeInvocationObjectArgumentsOnly:count:typeString:selector:isReply:into:] + 212
13 Foundation 0x1afa85ef8 -[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:] + 1448
14 Foundation 0x1afa8e4e4 -[NSXPCConnection _sendSelector:withProxy:arg1:] + 132
15 Foundation 0x1afa8e408 NSXPCDistantObjectSimpleMessageSend1 + 68
16 CoreFoundation 0x1aebc9c54 invoking
+ 148
17 CoreFoundation 0x1aebc9acc -[NSInvocation invoke] + 468
18 CoreFoundation 0x1aebfd510 -[NSInvocation invokeWithTarget:] + 80
19 ViewBridge 0x1b5f38b9c -[NSVB_ViewServiceImplicitAnimationEncodingProxy forwardInvocation:] + 204
20 CoreFoundation 0x1aebc80ec forwarding + 1004
21 CoreFoundation 0x1aebc7c40 _CF_forwarding_prep_0 + 96
22 ViewBridge 0x1b5fa3d50 -[NSRemoteView _maintainSnapshotOfAccessoryWindowInService:] + 284
23 ViewBridge 0x1b5f80b9c -[NSVBAccessoryWindow _setFrameCommon:display:stashSize:] + 764
24 AppKit 0x1b181d828 -[NSWindow(NSConstraintBasedLayout) _changeWindowFrameFromConstraintsIfNecessary] + 468
25 CoreAutoLayout 0x1b60a509c -[NSISEngine withBehaviors:performModifications:] + 88
26 AppKit 0x1b181d5ec -[NSWindow(NSConstraintBasedLayout) layoutIfNeeded] + 264
27 AppKit 0x1b189dcd0 -[NSView _layoutAtWindowLevelIfNeeded] + 92
28 AppKit 0x1b189d0a8 -[NSView _oldDisplayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 92
29 AppKit 0x1b18216ec -[NSView displayIfNeeded] + 496
30 AppKit 0x1b17a22b4 -[NSWindow _setFrameCommon:display:fromServer:] + 3556
31 ViewBridge 0x1b5f80a10 -[NSVBAccessoryWindow _setFrameCommon:display:stashSize:] + 368
32 ViewBridge 0x1b5f9b608 -[NSRemoteView serviceAccessoryViewFrameChanged:] + 88
33 CoreFoundation 0x1aebc9c54 invoking
+ 148
34 CoreFoundation 0x1aebc9acc -[NSInvocation invoke] + 468
35 ViewBridge 0x1b5f37e08 __deferNSXPCInvocationOntoMainThread_block_invoke + 248
36 ViewBridge 0x1b5f2aac8 __wrapBlockWithVoucher_block_invoke + 56
37 ViewBridge 0x1b5f2a73c __deferBlockOntoMainThread_block_invoke_2 + 324
38 CoreFoundation 0x1aebe89a4 CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 28
39 CoreFoundation 0x1aebe881c __CFRunLoopDoBlocks + 412
40 CoreFoundation 0x1aebe749c __CFRunLoopRun + 808
41 CoreFoundation 0x1aebe69d4 CFRunLoopRunSpecific + 600
42 ViewBridge 0x1b5f29a6c __invokeRunLoopInModeForDuration_block_invoke_2 + 36
43 ViewBridge 0x1b5f29944 invokeRunLoopInModeForDuration + 216
44 ViewBridge 0x1b5f29860 __29-[NSCFRunLoopSemaphore wait:]_block_invoke_3 + 116
45 ViewBridge 0x1b5f297e4 CONSIDER_WHO_REQUESTED_THIS_WAIT_BEFORE_SENDING_BUG_TO_VIEWBRIDGE + 24
46 ViewBridge 0x1b5f29798 __29-[NSCFRunLoopSemaphore wait:]_block_invoke_2 + 144
47 ViewBridge 0x1b5f29678 __29-[NSCFRunLoopSemaphore wait:]_block_invoke + 208
48 ViewBridge 0x1b5f29268 +[NSCFRunLoopSemaphore _observe:whilePerforming:] + 312
49 ViewBridge 0x1b5f28de8 -[NSCFRunLoopSemaphore wait:] + 204
50 ViewBridge 0x1b5f28c2c -[NSCFRunLoopSemaphore wait] + 44
51 AppKit 0x1b2180bd4 -[NSSavePanel beginServicePanel] + 440
52 AppKit 0x1b218271c -[NSSavePanel runModal] + 576
53 libtk8.6.dylib 0x105b31708 showOpenSavePanel + 120
54 libtk8.6.dylib 0x105b32108 Tk_GetSaveFileObjCmd + 2140
55 libtcl8.6.dylib 0x1058ee244 Tcl_EvalObjv + 340
56 _tkinter.cpython-310-darwin.so 0x10572855c Tkapp_Call + 336
57 python3.10 0x104de966c cfunction_call + 96
58 python3.10 0x104ea51b0 _PyEval_EvalFrameDefault + 50500
59 python3.10 0x104d8bcf4 _PyFunction_Vectorcall + 548
60 python3.10 0x104ea11c4 _PyEval_EvalFrameDefault + 34136
61 python3.10 0x104d8bcf4 _PyFunction_Vectorcall + 548
62 python3.10 0x104ec1a48 call_function + 148
63 python3.10 0x104e9a86c _PyEval_EvalFrameDefault + 7168
64 python3.10 0x104d8bcf4 _PyFunction_Vectorcall + 548
65 python3.10 0x104ea11c4 _PyEval_EvalFrameDefault + 34136
66 python3.10 0x104d8bcf4 _PyFunction_Vectorcall + 548
67 python3.10 0x104d904b8 method_vectorcall + 388
68 python3.10 0x104ea0cb4 _PyEval_EvalFrameDefault + 32840
69 python3.10 0x104d8bcf4 _PyFunction_Vectorcall + 548
70 python3.10 0x104d904b8 method_vectorcall + 388
71 _tkinter.cpython-310-darwin.so 0x10572a890 PythonCmd + 196
72 libtcl8.6.dylib 0x1058f0294 TclEvalObjEx + 112
73 libtk8.6.dylib 0x105aaf240 TkInvokeMenu + 480
74 libtk8.6.dylib 0x105b3e7bc -[TKMenu(TKMenuActions) tkMenuItemInvoke:] + 188
75 AppKit 0x1b1953564 -[NSApplication(NSResponder) sendAction:to:from:] + 460
76 AppKit 0x1b1a49288 -[NSMenuItem _corePerformAction] + 444
77 AppKit 0x1b1a48f7c -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 100
78 AppKit 0x1b1a91b74 -[NSMenu performActionForItemAtIndex:] + 200
79 AppKit 0x1b1a91a94 -[NSMenu _internalPerformActionForItemAtIndex:] + 100
80 AppKit 0x1b1a918a0 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 116
81 AppKit 0x1b1a2ce0c NSSLMMenuEventHandler + 728
82 HIToolbox 0x1b78076c8 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1084
83 HIToolbox 0x1b7806b4c SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 356
84 HIToolbox 0x1b781ce50 SendEventToEventTarget + 40
85 HIToolbox 0x1b787d870 SendHICommandEvent(unsigned int, HICommand const*, unsigned int, unsigned int, unsigned char, void const*, OpaqueEventTargetRef*, OpaqueEventTargetRef*, OpaqueEventRef**) + 416
86 HIToolbox 0x1b78a29ac SendMenuCommandWithContextAndModifiers + 56
87 HIToolbox 0x1b78a293c SendMenuItemSelectedEvent + 352
88 HIToolbox 0x1b78a2768 FinishMenuSelection(SelectionData*, MenuResult*, MenuResult*) + 100
89 HIToolbox 0x1b78a3128 MenuSelectCore(MenuData*, Point, double, unsigned int, OpaqueMenuRef**, unsigned short*) + 560
90 HIToolbox 0x1b78a2e48 _HandleMenuSelection2 + 416
91 AppKit 0x1b18ec68c _NSHandleCarbonMenuEvent + 300
92 AppKit 0x1b18ec46c _DPSEventHandledByCarbon + 68
93 AppKit 0x1b174e550 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3280
94 libtk8.6.dylib 0x105b44750 TkMacOSXEventsCheckProc + 448
95 libtcl8.6.dylib 0x1059a9968 Tcl_DoOneEvent + 320
96 _tkinter.cpython-310-darwin.so 0x105729e10 _tkinter_tkapp_mainloop_impl + 252
97 python3.10 0x104d9af30 method_vectorcall_FASTCALL + 108
98 python3.10 0x104ea11c4 _PyEval_EvalFrameDefault + 34136
99 python3.10 0x104d8bcf4 _PyFunction_Vectorcall + 548
100 python3.10 0x104d903b0 method_vectorcall + 124
101 python3.10 0x104ea296c _PyEval_EvalFrameDefault + 40192
102 python3.10 0x104d8bcf4 _PyFunction_Vectorcall + 548
103 python3.10 0x104ec1a48 call_function + 148
104 python3.10 0x104e9a95c _PyEval_EvalFrameDefault + 7408
105 python3.10 0x104e96f60 _PyEval_Vector + 532
106 python3.10 0x104f1027c run_mod + 220
107 python3.10 0x104f1001c pyrun_file + 156
108 python3.10 0x104f0fa68 _PyRun_SimpleFileObject + 316
109 python3.10 0x104f0f3d0 _PyRun_AnyFileObject + 216
110 python3.10 0x104f33a8c pymain_run_file_obj + 196
111 python3.10 0x104f33318 pymain_run_file + 72
112 python3.10 0x104f329b8 pymain_run_python + 340
113 python3.10 0x104f3280c Py_RunMain + 40
114 python3.10 0x104d2bb58 main + 56
115 dyld 0x10527108c start + 520

Thread 1:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x1aeade890 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1aeaded00 mach_msg + 76
2 CoreFoundation 0x1aebe9160 __CFRunLoopServiceMachPort + 372
3 CoreFoundation 0x1aebe7610 __CFRunLoopRun + 1180
4 CoreFoundation 0x1aebe69d4 CFRunLoopRunSpecific + 600
5 AppKit 0x1b18bc09c _NSEventThread + 196
6 libsystem_pthread.dylib 0x1aeb1c26c _pthread_start + 148
7 libsystem_pthread.dylib 0x1aeb1708c thread_start + 8

Thread 2:
0 libsystem_kernel.dylib 0x1aeae9578 __select + 8
1 libtcl8.6.dylib 0x1059fcff8 NotifierThreadProc + 668
2 libsystem_pthread.dylib 0x1aeb1c26c _pthread_start + 148
3 libsystem_pthread.dylib 0x1aeb1708c thread_start + 8

Thread 3:
0 libsystem_pthread.dylib 0x1aeb17078 start_wqthread + 0

Thread 4:
0 libsystem_pthread.dylib 0x1aeb17078 start_wqthread + 0

Thread 5:
0 libsystem_kernel.dylib 0x1aeae2250 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1aeb1c83c _pthread_cond_wait + 1236
2 libtcl8.6.dylib 0x1059e8a58 Tcl_ConditionWait + 252
3 _tkinter.cpython-310-darwin.so 0x10572a7ac Tkapp_ThreadSend + 92
4 _tkinter.cpython-310-darwin.so 0x1057284e0 Tkapp_Call + 212
5 python3.10 0x104d9b5ac method_vectorcall_VARARGS + 344
6 python3.10 0x104ea11c4 _PyEval_EvalFrameDefault + 34136
7 python3.10 0x104d8bcf4 _PyFunction_Vectorcall + 548
8 python3.10 0x104d903b0 method_vectorcall + 124
9 python3.10 0x104ea296c _PyEval_EvalFrameDefault + 40192
10 python3.10 0x104d8bcf4 _PyFunction_Vectorcall + 548
11 python3.10 0x104ea11c4 _PyEval_EvalFrameDefault + 34136
12 python3.10 0x104d8bcf4 _PyFunction_Vectorcall + 548
13 python3.10 0x104d90454 method_vectorcall + 288
14 python3.10 0x104ea0cb4 _PyEval_EvalFrameDefault + 32840
15 python3.10 0x104d8bcf4 _PyFunction_Vectorcall + 548
16 python3.10 0x104ea11c4 _PyEval_EvalFrameDefault + 34136
17 python3.10 0x104d8bcf4 _PyFunction_Vectorcall + 548
18 python3.10 0x104ea11c4 _PyEval_EvalFrameDefault + 34136
19 python3.10 0x104d8bcf4 _PyFunction_Vectorcall + 548
20 python3.10 0x104d904b8 method_vectorcall + 388
21 python3.10 0x104f80190 thread_run + 164
22 python3.10 0x104f20d8c pythread_wrapper + 48
23 libsystem_pthread.dylib 0x1aeb1c26c _pthread_start + 148
24 libsystem_pthread.dylib 0x1aeb1708c thread_start + 8

Thread 6:
0 libsystem_pthread.dylib 0x1aeb17078 start_wqthread + 0

Thread 7:
0 libsystem_pthread.dylib 0x1aeb17078 start_wqthread + 0

Thread 8:
0 libsystem_pthread.dylib 0x1aeb17078 start_wqthread + 0

Thread 9:
0 libsystem_pthread.dylib 0x1aeb17078 start_wqthread + 0

Thread 10:
0 libsystem_kernel.dylib 0x1aeae2250 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1aeb1c83c _pthread_cond_wait + 1236
2 Foundation 0x1afca26fc -[_NSThreadPerformInfo wait] + 68
3 Foundation 0x1afabacc4 -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 784
4 libtk8.6.dylib 0x105b3e050 -[TKBackgroundLoop main] + 208
5 Foundation 0x1afac559c NSThread__start + 808
6 libsystem_pthread.dylib 0x1aeb1c26c _pthread_start + 148
7 libsystem_pthread.dylib 0x1aeb1708c thread_start + 8

Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x00000001b7c02de8 x2: 0x00000001b7c02de8 x3: 0x000000000000001b
x4: 0x0000000000000074 x5: 0x0000000000000068 x6: 0x00000001b5a553e4 x7: 0x0000000000000001
x8: 0x0000000000000000 x9: 0x0000000000000100 x10: 0x0000000000003c30 x11: 0x0000000000000000
x12: 0x00000000f1631108 x13: 0x0000000071631000 x14: 0x0000000071600000 x15: 0x0000000207591040
x16: 0x0000000000000000 x17: 0x0000000209248278 x18: 0x0000000000000000 x19: 0x0000000204f3fc10
x20: 0x0000600000cabc30 x21: 0x0000000000000001 x22: 0x0000000000000001 x23: 0x0000600001717700
x24: 0x00006000029cc7e0 x25: 0x0000000000000001 x26: 0x0000000000000001 x27: 0x00000001f8e731bf
x28: 0x00000001f8f0a0df fp: 0x000000016b0d3850 lr: 0x00000001b7c02dfc
sp: 0x000000016b0d3850 pc: 0x0000000000000000 cpsr: 0x60001000
far: 0x0000000000000000 esr: 0x82000006 (Instruction Abort) Translation fault

Binary Images:
0x0 - 0xffffffffffffffff ??? () <00000000-0000-0000-0000-000000000000> ???
0x1ae954000 - 0x1ae99afff libdispatch.dylib (
) <26532eb9-1697-3bcb-aa36-f07a3405770a> /usr/lib/system/libdispatch.dylib
0x1b7b7e000 - 0x1b7dcdfff com.apple.ImageIO (3.3.0) /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
0x1b170e000 - 0x1b25c6fff com.apple.AppKit (6.9) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x1afa69000 - 0x1afe5afff com.apple.Foundation (6.9) <6a33f522-7b02-3eb6-a929-f7a6b9db3f72> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x1aeb64000 - 0x1af0aafff com.apple.CoreFoundation (6.9) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x1b5f25000 - 0x1b6020fff com.apple.ViewBridge (640.1) /System/Library/PrivateFrameworks/ViewBridge.framework/Versions/A/ViewBridge
0x1b6094000 - 0x1b60defff com.apple.CoreAutoLayout (1.0) <8efc0d83-c977-3778-9d17-456d87a68a78> /System/Library/PrivateFrameworks/CoreAutoLayout.framework/Versions/A/CoreAutoLayout
0x105a60000 - 0x105b7ffff libtk8.6.dylib () <25ab018a-0c9a-3667-bc5b-3e243717dacf> /Users/USER//libtk8.6.dylib
0x1058d0000 - 0x105a1ffff libtcl8.6.dylib () /Users/USER//libtcl8.6.dylib
0x105720000 - 0x10572ffff _tkinter.cpython-310-darwin.so () <48f6438b-447d-3a20-832c-6ae6971ee345> /Users/USER//_tkinter.cpython-310-darwin.so
0x104d24000 - 0x105033fff python3.10 () <17cf3cb5-0a5a-332f-9993-8461d8524238> /Users/USER//python3.10
0x1b77fd000 - 0x1b7b30fff com.apple.HIToolbox (2.1.1) <07987381-b579-3f72-8ba8-97fa5b5a3352> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
0x10526c000 - 0x1052cbfff dyld () <6c9a46d9-7137-3785-afc9-7feeceb8cadb> /usr/lib/dyld
0x1aeadd000 - 0x1aeb14fff libsystem_kernel.dylib (
) <4b67e099-d4a8-37e2-a8be-f4718e5dc028> /usr/lib/system/libsystem_kernel.dylib
0x1aeb15000 - 0x1aeb21fff libsystem_pthread.dylib (*) <569fc817-bb09-3ef2-8b18-af7f7bd615ec> /usr/lib/system/libsystem_pthread.dylib

External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 0
thread_create: 0
thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=852.5M resident=0K(0%) swapped_out_or_unallocated=852.5M(100%)
Writable regions: Total=2.0G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=2.0G(100%)

                            VIRTUAL   REGION 

REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Accelerate framework 768K 6
Activity Tracing 256K 1
CG backing stores 8576K 8
CG image 800K 8
ColorSync 624K 27
CoreAnimation 51.0M 16
CoreGraphics 48K 3
CoreUI image data 1888K 13
Foundation 16K 1
Kernel Alloc Once 32K 1
MALLOC 316.7M 232
MALLOC guard page 192K 11
MALLOC_MEDIUM (reserved) 1.2G 10 reserved VM address space (unallocated)
MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)
STACK GUARD 176K 11
Stack 36.4M 11
VM_ALLOCATE 17.0M 40
__AUTH 1905K 178
__AUTH_CONST 10.9M 331
__CTF 756 1
__DATA 9871K 379
__DATA_CONST 13.3M 389
__DATA_DIRTY 858K 117
__FONT_DATA 4K 1
__LINKEDIT 582.1M 60
__OBJC_CONST 1781K 155
__OBJC_RO 83.0M 1
__OBJC_RW 3168K 1
__TEXT 270.4M 405
__UNICODE 592K 1
dyld private memory 1024K 1
mapped file 166.9M 25
shared memory 1408K 15
=========== ======= =======
TOTAL 3.1G 2460
TOTAL, minus reserved VM space 1.5G 2460


Full Report

{"app_name":"python3.10","timestamp":"2023-12-28 21:59:03.00 +0100","app_version":"","slice_uuid":"17cf3cb5-0a5a-332f-9993-8461d8524238","build_version":"","platform":1,"share_with_app_devs":0,"is_first_party":1,"bug_type":"309","os_version":"macOS 12.7 (21G816)","incident_id":"96052AC9-9C79-4FA0-8FE9-AF5E1A5ECA70","name":"python3.10"}
{
"uptime" : 2000000,
"procLaunch" : "2023-12-28 21:58:19.1091 +0100",
"procRole" : "Foreground",
"version" : 2,
"userID" : 502,
"deployVersion" : 210,
"modelCode" : "MacBookPro18,2",
"procStartAbsTime" : 49685898770431,
"coalitionID" : 3017,
"osVersion" : {
"train" : "macOS 12.7",
"build" : "21G816",
"releaseType" : "User"
},
"captureTime" : "2023-12-28 21:59:02.3466 +0100",
"incident" : "96052AC9-9C79-4FA0-8FE9-AF5E1A5ECA70",
"bug_type" : "309",
"pid" : 23489,
"procExitAbsTime" : 49686934861436,
"translated" : false,
"cpuType" : "ARM-64",
"procName" : "python3.10",
"procPath" : "/Users/USER//python",
"parentProc" : "zsh",
"parentPid" : 4478,
"coalitionName" : "com.apple.Terminal",
"crashReporterKey" : "ED00EC5F-84FF-208C-8B11-D7D296943ACF",
"responsiblePid" : 4934,
"responsibleProc" : "Terminal",
"wakeTime" : 547106,
"sleepWakeUUID" : "5E1BCE4F-9D11-41EE-A854-528A5218764D",
"sip" : "disabled",
"vmRegionInfo" : "0 is not in any region. Bytes before following region: 4375855104\n REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n---> \n __TEXT 104d24000-105034000 [ 3136K] r-x/r-x SM=COW .../
/python3.10",
"isCorpse" : 1,
"exception" : {"codes":"0x0000000000000001, 0x0000000000000000","rawCodes":[1,0],"type":"EXC_BAD_ACCESS","signal":"SIGSEGV","subtype":"KERN_INVALID_ADDRESS at 0x0000000000000000"},
"termination" : {"flags":0,"code":11,"namespace":"SIGNAL","indicator":"Segmentation fault: 11","byProc":"exc handler","byPid":23489},
"vmregioninfo" : "0 is not in any region. Bytes before following region: 4375855104\n REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n---> \n _TEXT 104d24000-105034000 [ 3136K] r-x/r-x SM=COW .../*/python3.10",
"extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
"faultingThread" : 0,
"threads" : [{"triggered":true,"id":14266983,"threadState":{"x":[{"value":0},{"value":7377792488,"symbolLocation":0,"symbol":"invocation function for block in SetupTIFFErrorHandler()"},{"value":7377792488,"symbolLocation":0,"symbol":"invocation function for block in SetupTIFFErrorHandler()"},{"value":27},{"value":116},{"value":104},{"value":7342478308,"symbolLocation":312,"symbol":"kImageTilingInfo_CG8bpc"},{"value":1},{"value":0},{"value":256},{"value":15408},{"value":0},{"value":4049801480},{"value":1902317568},{"value":1902116864},{"value":8713211968,"symbolLocation":0,"symbol":"OBJC_CLASS
$___NSArrayM"},{"value":0},{"value":8743322232},{"value":0},{"value":8673033232,"symbolLocation":0,"symbol":"SetupTIFFErrorHandler()::setupOnce"},{"value":105553129552944},{"value":1},{"value":1},{"value":105553140479744},{"value":105553160095712},{"value":1},{"value":1},{"value":8470868415,"objc-selector":"objectAtIndex:"},{"value":8471486687,"objc-selector":"_getCGImageRefCreateIfNecessary"}],"flavor":"ARM_THREAD_STATE64","lr":{"value":7377792508},"cpsr":{"value":1610616832},"fp":{"value":6090995792},"sp":{"value":6090995792},"esr":{"value":2181038086,"description":"(Instruction Abort) Translation fault"},"pc":{"value":0},"far":{"value":0}},"queue":"com.apple.main-thread","frames":[{"imageOffset":0,"imageIndex":0},{"imageOffset":16820,"symbol":"_dispatch_client_callout","symbolLocation":20,"imageIndex":1},{"imageOffset":23092,"symbol":"_dispatch_once_callout","symbolLocation":32,"imageIndex":1},{"imageOffset":23672,"symbol":"TIFFWritePlugin::writeAll()","symbolLocation":80,"imageIndex":2},{"imageOffset":23520,"symbol":"IIO_Writer_TIFF::write(void*, void*)","symbolLocation":36,"imageIndex":2},{"imageOffset":852208,"symbol":"IIOImageDestination::finalizeDestination()","symbolLocation":592,"imageIndex":2},{"imageOffset":23148,"symbol":"CGImageDestinationFinalize","symbolLocation":132,"imageIndex":2},{"imageOffset":2874684,"symbol":"+[NSBitmapImageRep(NSBitmapImageFileTypeExtensions) representationOfImageRepsInArray:usingType:properties:]","symbolLocation":2048,"imageIndex":3},{"imageOffset":4824888,"symbol":"-[NSBitmapImageRep TIFFRepresentation]","symbolLocation":76,"imageIndex":3},{"imageOffset":4821276,"symbol":"-[NSBitmapImageRep encodeWithCoder:]","symbolLocation":44,"imageIndex":3},{"imageOffset":126204,"symbol":"-[NSXPCEncoder _encodeObject:]","symbolLocation":520,"imageIndex":4},{"imageOffset":147636,"symbol":"_NSXPCSerializationAddInvocationWithOnlyObjectArgumentsArray","symbolLocation":120,"imageIndex":4},{"imageOffset":147296,"symbol":"-[NSXPCEncoder _encodeInvocationObjectArgumentsOnly:count:typeString:selector:isReply:into:]","symbolLocation":212,"imageIndex":4},{"imageOffset":118520,"symbol":"-[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]","symbolLocation":1448,"imageIndex":4},{"imageOffset":152804,"symbol":"-[NSXPCConnection _sendSelector:withProxy:arg1:]","symbolLocation":132,"imageIndex":4},{"imageOffset":152584,"symbol":"NSXPCDistantObjectSimpleMessageSend1","symbolLocation":68,"imageIndex":4},{"imageOffset":416852,"symbol":"invoking","symbolLocation":148,"imageIndex":5},{"imageOffset":416460,"symbol":"-[NSInvocation invoke]","symbolLocation":468,"imageIndex":5},{"imageOffset":627984,"symbol":"-[NSInvocation invokeWithTarget:]","symbolLocation":80,"imageIndex":5},{"imageOffset":80796,"symbol":"-[NSVB_ViewServiceImplicitAnimationEncodingProxy forwardInvocation:]","symbolLocation":204,"imageIndex":6},{"imageOffset":409836,"symbol":"forwarding","symbolLocation":1004,"imageIndex":5},{"imageOffset":408640,"symbol":"_CF_forwarding_prep_0","symbolLocation":96,"imageIndex":5},{"imageOffset":519504,"symbol":"-[NSRemoteView _maintainSnapshotOfAccessoryWindowInService:]","symbolLocation":284,"imageIndex":6},{"imageOffset":375708,"symbol":"-[NSVBAccessoryWindow _setFrameCommon:display:stashSize:]","symbolLocation":764,"imageIndex":6},{"imageOffset":1112104,"symbol":"-[NSWindow(NSConstraintBasedLayout) _changeWindowFrameFromConstraintsIfNecessary]","symbolLocation":468,"imageIndex":3},{"imageOffset":69788,"symbol":"-[NSISEngine withBehaviors:performModifications:]","symbolLocation":88,"imageIndex":7},{"imageOffset":1111532,"symbol":"-[NSWindow(NSConstraintBasedLayout) layoutIfNeeded]","symbolLocation":264,"imageIndex":3},{"imageOffset":1637584,"symbol":"-[NSView _layoutAtWindowLevelIfNeeded]","symbolLocation":92,"imageIndex":3},{"imageOffset":1634472,"symbol":"-[NSView _oldDisplayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:]","symbolLocation":92,"imageIndex":3},{"imageOffset":1128172,"symbol":"-[NSView displayIfNeeded]","symbolLocation":496,"imageIndex":3},{"imageOffset":606900,"symbol":"-[NSWindow _setFrameCommon:display:fromServer:]","symbolLocation":3556,"imageIndex":3},{"imageOffset":375312,"symbol":"-[NSVBAccessoryWindow _setFrameCommon:display:stashSize:]","symbolLocation":368,"imageIndex":6},{"imageOffset":484872,"symbol":"-[NSRemoteView serviceAccessoryViewFrameChanged:]","symbolLocation":88,"imageIndex":6},{"imageOffset":416852,"symbol":"invoking","symbolLocation":148,"imageIndex":5},{"imageOffset":416460,"symbol":"-[NSInvocation invoke]","symbolLocation":468,"imageIndex":5},{"imageOffset":77320,"symbol":"__deferNSXPCInvocationOntoMainThread_block_invoke","symbolLocation":248,"imageIndex":6},{"imageOffset":23240,"symbol":"__wrapBlockWithVoucher_block_invoke","symbolLocation":56,"imageIndex":6},{"imageOffset":22332,"symbol":"__deferBlockOntoMainThread_block_invoke_2","symbolLocation":324,"imageIndex":6},{"imageOffset":543140,"symbol":"CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK","symbolLocation":28,"imageIndex":5},{"imageOffset":542748,"symbol":"__CFRunLoopDoBlocks","symbolLocation":412,"imageIndex":5},{"imageOffset":537756,"symbol":"__CFRunLoopRun","symbolLocation":808,"imageIndex":5},{"imageOffset":534996,"symbol":"CFRunLoopRunSpecific","symbolLocation":600,"imageIndex":5},{"imageOffset":19052,"symbol":"__invokeRunLoopInModeForDuration_block_invoke_2","symbolLocation":36,"imageIndex":6},{"imageOffset":18756,"symbol":"invokeRunLoopInModeForDuration","symbolLocation":216,"imageIndex":6},{"imageOffset":18528,"symbol":"__29-[NSCFRunLoopSemaphore wait:]_block_invoke_3","symbolLocation":116,"imageIndex":6},{"imageOffset":18404,"symbol":"CONSIDER_WHO_REQUESTED_THIS_WAIT_BEFORE_SENDING_BUG_TO_VIEWBRIDGE","symbolLocation":24,"imageIndex":6},{"imageOffset":18328,"symbol":"__29-[NSCFRunLoopSemaphore wait:]_block_invoke_2","symbolLocation":144,"imageIndex":6},{"imageOffset":18040,"symbol":"__29-[NSCFRunLoopSemaphore wait:]_block_invoke","symbolLocation":208,"imageIndex":6},{"imageOffset":17000,"symbol":"+[NSCFRunLoopSemaphore _observe:whilePerforming:]","symbolLocation":312,"imageIndex":6},{"imageOffset":15848,"symbol":"-[NSCFRunLoopSemaphore wait:]","symbolLocation":204,"imageIndex":6},{"imageOffset":15404,"symbol":"-[NSCFRunLoopSemaphore wait]","symbolLocation":44,"imageIndex":6},{"imageOffset":10955732,"symbol":"-[NSSavePanel beginServicePanel]","symbolLocation":440,"imageIndex":3},{"imageOffset":10962716,"symbol":"-[NSSavePanel runModal]","symbolLocation":576,"imageIndex":3},{"imageOffset":857864,"symbol":"showOpenSavePanel","symbolLocation":120,"imageIndex":8},{"imageOffset":860424,"symbol":"Tk_GetSaveFileObjCmd","symbolLocation":2140,"imageIndex":8},{"imageOffset":123460,"symbol":"Tcl_EvalObjv","symbolLocation":340,"imageIndex":9},{"imageOffset":34140,"symbol":"Tkapp_Call","symbolLocation":336,"imageIndex":10},{"imageOffset":808556,"symbol":"cfunction_call","symbolLocation":96,"imageIndex":11},{"imageOffset":1577392,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":50500,"imageIndex":11},{"imageOffset":425204,"symbol":"_PyFunction_Vectorcall","symbolLocation":548,"imageIndex":11},{"imageOffset":1561028,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":34136,"imageIndex":11},{"imageOffset":425204,"symbol":"_PyFunction_Vectorcall","symbolLocation":548,"imageIndex":11},{"imageOffset":1694280,"symbol":"call_function","symbolLocation":148,"imageIndex":11},{"imageOffset":1534060,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":7168,"imageIndex":11},{"imageOffset":425204,"symbol":"_PyFunction_Vectorcall","symbolLocation":548,"imageIndex":11},{"imageOffset":1561028,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":34136,"imageIndex":11},{"imageOffset":425204,"symbol":"_PyFunction_Vectorcall","symbolLocation":548,"imageIndex":11},{"imageOffset":443576,"symbol":"method_vectorcall","symbolLocation":388,"imageIndex":11},{"imageOffset":1559732,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":32840,"imageIndex":11},{"imageOffset":425204,"symbol":"_PyFunction_Vectorcall","symbolLocation":548,"imageIndex":11},{"imageOffset":443576,"symbol":"method_vectorcall","symbolLocation":388,"imageIndex":11},{"imageOffset":43152,"symbol":"PythonCmd","symbolLocation":196,"imageIndex":10},{"imageOffset":131732,"symbol":"TclEvalObjEx","symbolLocation":112,"imageIndex":9},{"imageOffset":324160,"symbol":"TkInvokeMenu","symbolLocation":480,"imageIndex":8},{"imageOffset":911292,"symbol":"-[TKMenu(TKMenuActions) tkMenuItemInvoke:]","symbolLocation":188,"imageIndex":8},{"imageOffset":2381156,"symbol":"-[NSApplication(NSResponder) sendAction:to:from:]","symbolLocation":460,"imageIndex":3},{"imageOffset":3388040,"symbol":"-[NSMenuItem _corePerformAction]","symbolLocation":444,"imageIndex":3},{"imageOffset":3387260,"symbol":"-[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:]","symbolLocation":100,"imageIndex":3},{"imageOffset":3685236,"symbol":"-[NSMenu performActionForItemAtIndex:]","symbolLocation":200,"imageIndex":3},{"imageOffset":3685012,"symbol":"-[NSMenu _internalPerformActionForItemAtIndex:]","symbolLocation":100,"imageIndex":3},{"imageOffset":3684512,"symbol":"-[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:]","symbolLocation":116,"imageIndex":3},{"imageOffset":3272204,"symbol":"NSSLMMenuEventHandler","symbolLocation":728,"imageIndex":3},{"imageOffset":42696,"symbol":"DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*)","symbolLocation":1084,"imageIndex":12},{"imageOffset":39756,"symbol":"SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*)","symbolLocation":356,"imageIndex":12},{"imageOffset":130640,"symbol":"SendEventToEventTarget","symbolLocation":40,"imageIndex":12},{"imageOffset":526448,"symbol":"SendHICommandEvent(unsigned int, HICommand const*, unsigned int, unsigned int, unsigned char, void const*, OpaqueEventTargetRef*, OpaqueEventTargetRef*, OpaqueEventRef**)","symbolLocation":416,"imageIndex":12},{"imageOffset":678316,"symbol":"SendMenuCommandWithContextAndModifiers","symbolLocation":56,"imageIndex":12},{"imageOffset":678204,"symbol":"SendMenuItemSelectedEvent","symbolLocation":352,"imageIndex":12},{"imageOffset":677736,"symbol":"FinishMenuSelection(SelectionData*, MenuResult*, MenuResult*)","symbolLocation":100,"imageIndex":12},{"imageOffset":680232,"symbol":"MenuSelectCore(MenuData*, Point, double, unsigned int, OpaqueMenuRef**, unsigned short*)","symbolLocation":560,"imageIndex":12},{"imageOffset":679496,"symbol":"_HandleMenuSelection2","symbolLocation":416,"imageIndex":12},{"imageOffset":1959564,"symbol":"_NSHandleCarbonMenuEvent","symbolLocation":300,"imageIndex":3},{"imageOffset":1959020,"symbol":"_DPSEventHandledByCarbon","symbolLocation":68,"imageIndex":3},{"imageOffset":263504,"symbol":"-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]","symbolLocation":3280,"imageIndex":3},{"imageOffset":935760,"symbol":"TkMacOSXEventsCheckProc","symbolLocation":448,"imageIndex":8},{"imageOffset":891240,"symbol":"Tcl_DoOneEvent","symbolLocation":320,"imageIndex":9},{"imageOffset":40464,"symbol":"_tkinter_tkapp_mainloop_impl","symbolLocation":252,"imageIndex":10},{"imageOffset":487216,"symbol":"method_vectorcall_FASTCALL","symbolLocation":108,"imageIndex":11},{"imageOffset":1561028,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":34136,"imageIndex":11},{"imageOffset":425204,"symbol":"_PyFunction_Vectorcall","symbolLocation":548,"imageIndex":11},{"imageOffset":443312,"symbol":"method_vectorcall","symbolLocation":124,"imageIndex":11},{"imageOffset":1567084,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":40192,"imageIndex":11},{"imageOffset":425204,"symbol":"_PyFunction_Vectorcall","symbolLocation":548,"imageIndex":11},{"imageOffset":1694280,"symbol":"call_function","symbolLocation":148,"imageIndex":11},{"imageOffset":1534300,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":7408,"imageIndex":11},{"imageOffset":1519456,"symbol":"_PyEval_Vector","symbolLocation":532,"imageIndex":11},{"imageOffset":2015868,"symbol":"run_mod","symbolLocation":220,"imageIndex":11},{"imageOffset":2015260,"symbol":"pyrun_file","symbolLocation":156,"imageIndex":11},{"imageOffset":2013800,"symbol":"_PyRun_SimpleFileObject","symbolLocation":316,"imageIndex":11},{"imageOffset":2012112,"symbol":"_PyRun_AnyFileObject","symbolLocation":216,"imageIndex":11},{"imageOffset":2161292,"symbol":"pymain_run_file_obj","symbolLocation":196,"imageIndex":11},{"imageOffset":2159384,"symbol":"pymain_run_file","symbolLocation":72,"imageIndex":11},{"imageOffset":2156984,"symbol":"pymain_run_python","symbolLocation":340,"imageIndex":11},{"imageOffset":2156556,"symbol":"Py_RunMain","symbolLocation":40,"imageIndex":11},{"imageOffset":31576,"symbol":"main","symbolLocation":56,"imageIndex":11},{"imageOffset":20620,"symbol":"start","symbolLocation":520,"imageIndex":13}]},{"id":14267012,"name":"com.apple.NSEventThread","frames":[{"imageOffset":6288,"symbol":"mach_msg_trap","symbolLocation":8,"imageIndex":14},{"imageOffset":7424,"symbol":"mach_msg","symbolLocation":76,"imageIndex":14},{"imageOffset":545120,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":372,"imageIndex":5},{"imageOffset":538128,"symbol":"__CFRunLoopRun","symbolLocation":1180,"imageIndex":5},{"imageOffset":534996,"symbol":"CFRunLoopRunSpecific","symbolLocation":600,"imageIndex":5},{"imageOffset":1761436,"symbol":"_NSEventThread","symbolLocation":196,"imageIndex":3},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":15},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":15}]},{"id":14267014,"frames":[{"imageOffset":50552,"symbol":"__select","symbolLocation":8,"imageIndex":14},{"imageOffset":1232888,"symbol":"NotifierThreadProc","symbolLocation":668,"imageIndex":9},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":15},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":15}]},{"id":14267017,"frames":[{"imageOffset":8312,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":15}]},{"id":14267021,"frames":[{"imageOffset":8312,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":15}]},{"id":14267133,"frames":[{"imageOffset":21072,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":14},{"imageOffset":30780,"symbol":"_pthread_cond_wait","symbolLocation":1236,"imageIndex":15},{"imageOffset":1149528,"symbol":"Tcl_ConditionWait","symbolLocation":252,"imageIndex":9},{"imageOffset":42924,"symbol":"Tkapp_ThreadSend","symbolLocation":92,"imageIndex":10},{"imageOffset":34016,"symbol":"Tkapp_Call","symbolLocation":212,"imageIndex":10},{"imageOffset":488876,"symbol":"method_vectorcall_VARARGS","symbolLocation":344,"imageIndex":11},{"imageOffset":1561028,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":34136,"imageIndex":11},{"imageOffset":425204,"symbol":"_PyFunction_Vectorcall","symbolLocation":548,"imageIndex":11},{"imageOffset":443312,"symbol":"method_vectorcall","symbolLocation":124,"imageIndex":11},{"imageOffset":1567084,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":40192,"imageIndex":11},{"imageOffset":425204,"symbol":"_PyFunction_Vectorcall","symbolLocation":548,"imageIndex":11},{"imageOffset":1561028,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":34136,"imageIndex":11},{"imageOffset":425204,"symbol":"_PyFunction_Vectorcall","symbolLocation":548,"imageIndex":11},{"imageOffset":443476,"symbol":"method_vectorcall","symbolLocation":288,"imageIndex":11},{"imageOffset":1559732,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":32840,"imageIndex":11},{"imageOffset":425204,"symbol":"_PyFunction_Vectorcall","symbolLocation":548,"imageIndex":11},{"imageOffset":1561028,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":34136,"imageIndex":11},{"imageOffset":425204,"symbol":"_PyFunction_Vectorcall","symbolLocation":548,"imageIndex":11},{"imageOffset":1561028,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":34136,"imageIndex":11},{"imageOffset":425204,"symbol":"_PyFunction_Vectorcall","symbolLocation":548,"imageIndex":11},{"imageOffset":443576,"symbol":"method_vectorcall","symbolLocation":388,"imageIndex":11},{"imageOffset":2474384,"symbol":"thread_run","symbolLocation":164,"imageIndex":11},{"imageOffset":2084236,"symbol":"pythread_wrapper","symbolLocation":48,"imageIndex":11},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":15},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":15}]},{"id":14267217,"frames":[{"imageOffset":8312,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":15}]},{"id":14267218,"frames":[{"imageOffset":8312,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":15}]},{"id":14267219,"frames":[{"imageOffset":8312,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":15}]},{"id":14267220,"frames":[{"imageOffset":8312,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":15}]},{"id":14267264,"frames":[{"imageOffset":21072,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":14},{"imageOffset":30780,"symbol":"_pthread_cond_wait","symbolLocation":1236,"imageIndex":15},{"imageOffset":2332412,"symbol":"-[_NSThreadPerformInfo wait]","symbolLocation":68,"imageIndex":4},{"imageOffset":335044,"symbol":"-[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:]","symbolLocation":784,"imageIndex":4},{"imageOffset":909392,"symbol":"-[TKBackgroundLoop main]","symbolLocation":208,"imageIndex":8},{"imageOffset":378268,"symbol":"NSThread__start","symbolLocation":808,"imageIndex":4},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":15},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":15}]}],
"usedImages" : [
{
"size" : 0,
"source" : "A",
"base" : 0,
"uuid" : "00000000-0000-0000-0000-000000000000"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 7223984128,
"size" : 290816,
"uuid" : "26532eb9-1697-3bcb-aa36-f07a3405770a",
"path" : "/usr/lib/system/libdispatch.dylib",
"name" : "libdispatch.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 7377248256,
"CFBundleShortVersionString" : "3.3.0",
"CFBundleIdentifier" : "com.apple.ImageIO",
"size" : 2424832,
"uuid" : "c72f7d43-5e42-3d12-b82d-1716b9e71ee4",
"path" : "/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO",
"name" : "ImageIO",
"CFBundleVersion" : "2222.16.2"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 7271931904,
"CFBundleShortVersionString" : "6.9",
"CFBundleIdentifier" : "com.apple.AppKit",
"size" : 15437824,
"uuid" : "bfd62360-b17f-38b0-b906-6bac5500becf",
"path" : "/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit",
"name" : "AppKit",
"CFBundleVersion" : "2113.60.148"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 7241895936,
"CFBundleShortVersionString" : "6.9",
"CFBundleIdentifier" : "com.apple.Foundation",
"size" : 4136960,
"uuid" : "6a33f522-7b02-3eb6-a929-f7a6b9db3f72",
"path" : "/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation",
"name" : "Foundation",
"CFBundleVersion" : "1866"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 7226146816,
"CFBundleShortVersionString" : "6.9",
"CFBundleIdentifier" : "com.apple.CoreFoundation",
"size" : 5533696,
"uuid" : "d05de733-7a33-3fde-ae9b-2d54195b1bb0",
"path" : "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation",
"name" : "CoreFoundation",
"CFBundleVersion" : "1866"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 7347523584,
"CFBundleShortVersionString" : "640.1",
"CFBundleIdentifier" : "com.apple.ViewBridge",
"size" : 1032192,
"uuid" : "bd6d46dd-8ad4-3954-acb2-f05bf91d9c07",
"path" : "/System/Library/PrivateFrameworks/ViewBridge.framework/Versions/A/ViewBridge",
"name" : "ViewBridge",
"CFBundleVersion" : "640.1"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 7349026816,
"CFBundleShortVersionString" : "1.0",
"CFBundleIdentifier" : "com.apple.CoreAutoLayout",
"size" : 307200,
"uuid" : "8efc0d83-c977-3778-9d17-456d87a68a78",
"path" : "/System/Library/PrivateFrameworks/CoreAutoLayout.framework/Versions/A/CoreAutoLayout",
"name" : "CoreAutoLayout",
"CFBundleVersion" : "28"
},
{
"source" : "P",
"arch" : "arm64",
"base" : 4389732352,
"size" : 1179648,
"uuid" : "25ab018a-0c9a-3667-bc5b-3e243717dacf",
"path" : "/Users/USER//libtk8.6.dylib",
"name" : "libtk8.6.dylib"
},
{
"source" : "P",
"arch" : "arm64",
"base" : 4388093952,
"size" : 1376256,
"uuid" : "b84a2f71-5112-3420-9391-4b055a1463b7",
"path" : "/Users/USER/
/libtcl8.6.dylib",
"name" : "libtcl8.6.dylib"
},
{
"source" : "P",
"arch" : "arm64",
"base" : 4386324480,
"size" : 65536,
"uuid" : "48f6438b-447d-3a20-832c-6ae6971ee345",
"path" : "/Users/USER//_tkinter.cpython-310-darwin.so",
"name" : "_tkinter.cpython-310-darwin.so"
},
{
"source" : "P",
"arch" : "arm64",
"base" : 4375855104,
"size" : 3211264,
"uuid" : "17cf3cb5-0a5a-332f-9993-8461d8524238",
"path" : "/Users/USER/
/python3.10",
"name" : "python3.10"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 7373574144,
"CFBundleShortVersionString" : "2.1.1",
"CFBundleIdentifier" : "com.apple.HIToolbox",
"size" : 3358720,
"uuid" : "07987381-b579-3f72-8ba8-97fa5b5a3352",
"path" : "/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox",
"name" : "HIToolbox"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 4381392896,
"size" : 393216,
"uuid" : "6c9a46d9-7137-3785-afc9-7feeceb8cadb",
"path" : "/usr/lib/dyld",
"name" : "dyld"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 7225593856,
"size" : 229376,
"uuid" : "4b67e099-d4a8-37e2-a8be-f4718e5dc028",
"path" : "/usr/lib/system/libsystem_kernel.dylib",
"name" : "libsystem_kernel.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 7225823232,
"size" : 53248,
"uuid" : "569fc817-bb09-3ef2-8b18-af7f7bd615ec",
"path" : "/usr/lib/system/libsystem_pthread.dylib",
"name" : "libsystem_pthread.dylib"
}
],
"sharedCache" : {
"base" : 7222525952,
"size" : 3144908800,
"uuid" : "ea82cd22-1891-38ad-bbc7-f9014dee2001"
},
"vmSummary" : "ReadOnly portion of Libraries: Total=852.5M resident=0K(0%) swapped_out_or_unallocated=852.5M(100%)\nWritable regions: Total=2.0G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=2.0G(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nAccelerate framework 768K 6 \nActivity Tracing 256K 1 \nCG backing stores 8576K 8 \nCG image 800K 8 \nColorSync 624K 27 \nCoreAnimation 51.0M 16 \nCoreGraphics 48K 3 \nCoreUI image data 1888K 13 \nFoundation 16K 1 \nKernel Alloc Once 32K 1 \nMALLOC 316.7M 232 \nMALLOC guard page 192K 11 \nMALLOC_MEDIUM (reserved) 1.2G 10 reserved VM address space (unallocated)\nMALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)\nSTACK GUARD 176K 11 \nStack 36.4M 11 \nVM_ALLOCATE 17.0M 40 \n__AUTH 1905K 178 \n__AUTH_CONST 10.9M 331 \n__CTF 756 1 \n__DATA 9871K 379 \n__DATA_CONST 13.3M 389 \n__DATA_DIRTY 858K 117 \n__FONT_DATA 4K 1 \n__LINKEDIT 582.1M 60 \n__OBJC_CONST 1781K 155 \n__OBJC_RO 83.0M 1 \n__OBJC_RW 3168K 1 \n__TEXT 270.4M 405 \n__UNICODE 592K 1 \ndyld private memory 1024K 1 \nmapped file 166.9M 25 \nshared memory 1408K 15 \n=========== ======= ======= \nTOTAL 3.1G 2460 \nTOTAL, minus reserved VM space 1.5G 2460 \n",
"legacyInfo" : {
"threadTriggered" : {
"queue" : "com.apple.main-thread"
}
},
"trialInfo" : {
"rollouts" : [

],
"experiments" : [

]
}
}

Model: MacBookPro18,2, BootROM 10151.1.1, proc 10:8:2 processors, 64 GB, SMC
Graphics: Apple M1 Max, Apple M1 Max, Built-In
Display: DELL UP3216Q, 6016 x 3384, Main, MirrorOff, Online
Display: Color LCD, 3456 x 2234 Retina, MirrorOff, Online
Memory Module: LPDDR5
AirPort: Wi-Fi, wl0: Apr 6 2022 05:55:54 version 20.90.45.0.8.7.118 FWID 01-e7138ff2
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB31Bus
USB Device: USB3.0 Hub
USB Device: USB3.1 Hub
USB Device: AX88179A
USB Device: USB2.0 Hub
USB Device: USB2.1 Hub
USB Device: USB 2.0 Hub
USB Device: FT232R USB UART
USB Device: USB Mouse
USB Device: USB Billboard Device
USB Device: USB31Bus
USB Device: USB31Bus
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Device: WD19TB Thunderbolt Dock, Dell, 1, 60.60

[Feature] Manual serial port field for UDP fake PTY ports

Overview

I have a GPS that stream data via UPD to my PC. With that I did a fake "serial" interface, like /dev/pts/14, but I can't put it in the serial port connection option because is read only and it is for ttyUSB* ports. Is possible leave this like a manual field?

Solution

Leave the serial port like a manual field (r/w field)

Additional Context

To do a fake serial console and replicate it, please follow the next commands:

Init PTYs:

socat -d -d pty,raw,echo=0 pty,raw,echo=0

Output:

2022/10/07 18:05:11 socat[952338] N PTY is /dev/pts/14
2022/10/07 18:05:11 socat[952338] N PTY is /dev/pts/16
2022/10/07 18:05:11 socat[952338] N starting data transfer loop with FDs [5,5] and [7,7]

Write to input PTY with UDP data:

netcat -u -l -p 9000 > /dev/pts/16

Test new PTY:

cat < /dev/pts/14

output:

$GPGSV,1,1,00*79
$GPGLL,,,,,,V,N*64
$GPRMC,,V,,,,,,,,,,N*53
$GPVTG,,,,,,,,,N*30
$GPGGA,,,,,,0,00,99.99,,,,,,*48
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
$GPGSV,1,1,00*79
$GPGLL,,,,,,V,N*64
$GPRMC,,V,,,,,,,,,,N*53
$GPVTG,,,,,,,,,N*30
$GPGGA,,,,,,0,00,99.99,,,,,,*48
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*,,,,0,00,99.99,,,,,,*48
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30

Aborts on macOS 13.2.1 with couldn't recognize data in image file iconmonstr-location-27-32.png

After installing on macOS 13.2.1 with

python3 -m pip install --upgrade PyGPSClient

and then launching with

python3 -m pygpsclient

the program aborts immediately with following output:

Me@Mac-Studio ~ % python3 -m pygpsclient
DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning.
Traceback (most recent call last):
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/klingler/Library/Python/3.9/lib/python/site-packages/pygpsclient/__main__.py", line 43, in <module>
    main()
  File "/Users/klingler/Library/Python/3.9/lib/python/site-packages/pygpsclient/__main__.py", line 37, in main
    App(root, **kwargs)
  File "/Users/klingler/Library/Python/3.9/lib/python/site-packages/pygpsclient/app.py", line 118, in __init__
    self.__master.iconphoto(True, PhotoImage(file=ICON_APP))
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 4064, in __init__
    Image.__init__(self, 'photo', name, cnf, master, **kw)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 4009, in __init__
    self.tk.call(('image', 'create', imgtype, name,) + options)
_tkinter.TclError: couldn't recognize data in image file "/Users/Me/Library/Python/3.9/lib/python/site-packages/pygpsclient/resources/iconmonstr-location-27-32.png"

PyGPSClient becomes unresponsive if NMEA & UBX message rates are all set to zero.

Describe the bug

PyGPSClient becomes unresponsive if opened with a null serial stream, or if protocol filtering is altered at runtime and no messages of the given protocol are output by the device. Applies to all devices and platforms.

Basically, it enters a race state in the while self._reading and self._serial_object loop within the _read_thread() function as the if self._serial_object.in_waiting condition is never met.

Might be worth considering refactoring serial_handler in PyGPSClient serial_handler to use multiprocessing and queues rather than threads and virtual events, though need to confirm how well this approach would play with tkinter on all platforms (especially MacOS).

To Reproduce

  1. Set all NMEA and UBX message rates to zero.

Expected Behavior

Application should remain responsive. Perhaps disconnect automatically after n minutes of inactivity?

Additional context

Only an issue in practice if the messages rates are all set to zero.

KeyError: 'inactivity_timeout' when trying to use l-band spartn corrections:

There's a similar problem when trying to use l-band spartn corrections:

$ ./venvs/pygps/bin/pygpsclient
Exception in thread Thread-4 (_read_thread):
Traceback (most recent call last):
File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/usr/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/home/drd/venvs/pygps/lib/python3.11/site-packages/pygpsclient/stream_handler.py", line 120, in _read_thread
inactivity_timeout = settings["inactivity_timeout"]
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'inactivity_timeout'

It looks like the code that launches the reader thread doesn't provide an inactivity timeout in on_connect() in spartn_lband_frame.py

(That might have been on version 1.4.9 since I installed an older version to get around the first problem.)

Originally posted by @divenal in #118 (comment)

SPARTN GNSS config - setting both key1 (CURRENT) and key2 (NEXT) to same value

Describe the bug

PyGPSClient v1.3.17 on all platforms.

Typo in spartn_gnss_frame.py - setting both key1 (CURRENT) and key2 (NEXT) to same value:

    def _format_rxmspartn(self) -> UBXMessage:
        """
        Format UBX RXM-SPARTN-KEY message.
        """

        version = val2bytes(1, U1)
        numKeys = val2bytes(2, U1)
        key1 = bytes.fromhex(self._spartn_key1.get())
        keylen1 = val2bytes(len(key1), U1)
        wno1, tow1 = date2wnotow(self._get_date(self._spartn_valdate1))
        wno1b = val2bytes(wno1, U2)
        tow1b = val2bytes(tow1, U4)
        key2 = bytes.fromhex(self._spartn_key1.get()) <--- THIS SHOULD BE key2.get()
        keylen2 = val2bytes(len(key2), U1)
       etc...

To Reproduce

Steps to reproduce the behaviour:

  1. Enter different CURRENT and NEXT keys in dialog panel, click upload.
  2. Close and re-open panel - will show same key in both CURRENT and NEXT fields.

Expected Behaviour

  • Should save CURRENT and NEXT keys correctly.

Ublox Config Dialog with TCP Socket

Is your feature request related to a problem? Please describe.

I would like to be able to configure Ublox GNSS Devices over a TCP connection.

I need to use the TCP connection because I want multiple clients to be connected to the same reciever. They should able to configure the receiver and read the settings.

Describe the solution you'd like

There should be a way to send the configuration messages over the tcp connection, such that I can configure ublox parameters just as with a serial connection. There might be troubles with the response messages when multiple clients try to configure parameters at the same time, however it would already be a major improvement if it works when it works for one client configuring at a time.

Describe alternatives you've considered

I used socat to create a virtual serial port clone. However you'd need a new instance for every client and the buffering hard to configure properly.

Would you be willing to contribute a test device?

I think any ublox F9* device should be sufficient.

It would be awesome if you could implement that feature :)

Configuration Save to File

Is your feature request related to a problem? Please describe.
no
A clear and concise description of what the problem is e.g. I'd like to be able to do this [...]
I'd like to be able to save the configuration to a file, and then be able to load that configuration back later (or to a second device)

Describe the solution you'd like
I'd use the current menus to configure the device (I use F9Ps), and then I'd like to store that configuration to a file. This would allow me to quickly configure that same device or another device to my saved configuration. Thx!

A clear and concise description of what you want to happen.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Would you be willing to contribute a test device?

If the request relates to a specific u-blox device that is not currently supported, would you be
willing to contribute a device to the project for testing purposes?

Additional context

Add any other context about the feature request here.

MacOSX 11.7.9 no idea what's wrong

marc@marcs-MacBook-Pro ~ % python3 -m pygpsclient
/Users/marc/Library/Python/3.8/lib/python/site-packages/urllib3/init.py:34: NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: urllib3/urllib3#3020
warnings.warn(
macOS 11 (1107) or later required, have instead 11 (1106) !
zsh: abort python3 -m pygpsclient
marc@marcs-MacBook-Pro ~ %

PIL.Image has no attribute ANTIALIAS

Describe the bug

AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'

Additional context

pygnssutils-1.0.17, but all versions will see the error.

The problem and the solution is described here:
https://stackoverflow.com/questions/76616042/attributeerror-module-pil-image-has-no-attribute-antialias

The following change in site-packages/pygpsclient/ solves the problem:
Out: Image.open(IMG_WORLD).resize((w, h), Image.ANTIALIAS)
In: Image.open(IMG_WORLD).resize((w, h), Image.LANCZOS)

Problem started with upgrade from Pillow-9.5.0 to pillow-10.2.0
ANTIALIAS was removed in Pillow 10.0.0 (after being deprecated through many previous versions).

pyserial comports() outputting only /dev/cu.* , not /dev/tty.* on Mac

I downloaded the application on my M1Pro MacBook Pro today, everything worked, except the NTRIP client. (it showed connected but my receiver got no rtcm-stream)

I had a look around and found, that the port selector only offered /dev/cu.* Ports, no tty.

It looks like the cu ports only work "one-way" so the Ntrip client simply wasn't able to push the correction stream to the receiver.

I then confirmed my supposition by running

python -m serial.tools.list_ports -v

in the Terminal and I only got back:

/dev/cu.Bluetooth-Incoming-Port desc: n/a hwid: n/a /dev/cu.usbmodem3301 desc: u-blox GNSS receiver hwid: USB VID:PID=1546:01A9 LOCATION=3-3 2 ports found

As a simple fix I just edited serialconfig_frame.py in lines 262, 265 and 270 to replace "cu" by "tty"

I simply replaced the port calls in these lines by port.replace("cu", "tty").

After that, the Ntrip Client is working.

I don't know how to fix this the proper way, but you should have a look at this.

Thanks for this awesome application anyway.

Make console output copyable

Hey,
first: thanks for the great work!

I was wondering if the text console could be made copyable (i.e. I cannot copy text on Ubuntu Linux 20.04).
I understand that it comes from the disabled state to make the text field non-modifiable, there seem to be a couple work-arounds for this problem (see SO links below), but as I have never used tkinter before and am no python expert, I am not really sure what would be a good way to do this. I am happy to test and try stuff out, but before sinking in a lot of time and work for that feature I thought I ask you first (otherwise my local hotfix would be to set the text back to normal behavior..)

https://stackoverflow.com/questions/1602106/in-pythons-tkinter-how-can-i-make-a-label-such-that-you-can-select-the-text-wi
https://stackoverflow.com/questions/3842155/is-there-a-way-to-make-the-tkinter-text-widget-read-only#3842234

Best regards
Malte

Unhandled UBX messages stall parsing when read via TCP

Describe the bug

Parsing from a TCP socket stalls when reading a UBX stream containing unhandled messages that raise a parser exception.

Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pyubx2/ubxmessage.py", line 884, in identity
    umsg_name = ubt.UBX_MSGIDS[self._ubxClass + self._ubxID]
KeyError: b'\x01b'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/Cellar/[email protected]/3.9.12/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 1892, in __call__
    return self.func(*args)
  File "/usr/local/lib/python3.9/site-packages/pygpsclient/serial_handler.py", line 313, in on_readfile
    self._parse_data(self._serial_buffer)
  File "/usr/local/lib/python3.9/site-packages/pygpsclient/serial_handler.py", line 366, in _parse_data
    parsed_data = UBXReader.parse(raw_data)
  File "/usr/local/lib/python3.9/site-packages/pyubx2/ubxreader.py", line 372, in parse
    return UBXMessage(
  File "/usr/local/lib/python3.9/site-packages/pyubx2/ubxmessage.py", line 81, in __init__
    self._do_attributes(**kwargs)
  File "/usr/local/lib/python3.9/site-packages/pyubx2/ubxmessage.py", line 104, in _do_attributes
    pdict = self._get_dict(**kwargs)  # get appropriate payload dict
  File "/usr/local/lib/python3.9/site-packages/pyubx2/ubxmessage.py", line 523, in _get_dict
    pdict = ubg.UBX_PAYLOADS_GET[self.identity]
  File "/usr/local/lib/python3.9/site-packages/pyubx2/ubxmessage.py", line 886, in identity
    raise ube.UBXMessageError(
pyubx2.exceptions.UBXMessageError: Unknown UBX message type class b'\x01' id b'b'

This causes display of the stream PyGPSClient to stall. This can be replicated by removing support for any message type from pyubx2.

If the stream is written to a file with netcat and parsed as a file in PtyGPSClient this behaviour is not seen.

A workaround/fix for the unhandled message type exposing the problem (UBX-NAV-PL) is in a PR

A sample ubx log file is linked in the PR.

Exporting parsed UBX data

I have created a .ubx data by using u-center.
PyGPSClient succesfully parsed the data.
But I want to export the data to a txt so that I can depict a graph of certain parameters.
I tried to copy from the console but it did not work. Apart form CTRL + C, CTRL + F does not work in the console.
Since it is not useful to look at the data by using console, there must be a property where users can copy or export the data from the console.

image

MapQuest API key via env variable

Hi and thanks for a unix-friendly UI to parse ublox data. I was looking for a non-Windows solution and found yours.

I have lots of files in a home directory, and typically the keys are set via environment variables. Could you add such an option to parse the MQAPIKEY env var, if set, as an alternative to the mqapikey file?

Also, is there a way to show the data in Google Maps? The current map is non-interactive: I need to wait a minute before a new zoom is applied to the map...

Thanks.

incomplete configuration saving and loading

I am having weird issues with configuration files using pygpsclient version 1.4.0, installed with pip on Ubuntu 22.04:

  • serial port & ntrip client configurations are not saved: ntrip parameters are always set to default, I am not sure if serial port configuration is saved at all;
  • if I try to change ntrip parameters manually and then load them, they are set to defaults;
  • socket server port is saved to configuration file if I change it in GUI, but is not loaded.

Unable to start the Tk on Mac m1

Sorry sir, I just followed the guideline and try to run the pygpsclient. I type in python3 -m pygpsclient The console gives error:

DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning.
Traceback (most recent call last):
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/frank/PyGPSClient-master/src/pygpsclient/__main__.py", line 49, in <module>
    main()
  File "/Users/frank/PyGPSClient-master/src/pygpsclient/__main__.py", line 43, in main
    App(root, **kwargs)
  File "/Users/frank/PyGPSClient-master/src/pygpsclient/app.py", line 135, in __init__
    self.__master.iconphoto(True, PhotoImage(file=ICON_APP))
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 4064, in __init__
    Image.__init__(self, 'photo', name, cnf, master, **kw)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 4009, in __init__
    self.tk.call(('image', 'create', imgtype, name,) + options)
_tkinter.TclError: couldn't recognize data in image file "/Users/frank/PyGPSClient-master/src/pygpsclient/resources/iconmonstr-location-27-32.png"

My python3 version is 3.9.6, and Tk is 8.5. I installed pillow by brew.

KeyError on private RTCM3 messages

pygpsclient 1.3.21 throws KeyError exceptions on receiving private STMicroelectronics and SwiftNav RTCM3 messages:

`KeyError: '999'
Exception in Tkinter callback
Traceback (most recent call last):
...
if self._labelmsm and "MSM" in RTCM_MSGIDS[self.identity]:
~~~~~~~~~~~^^^^^^^^^^^^^^^

KeyError: '4062'
Exception in Tkinter callback
Traceback (most recent call last):
...
if self._labelmsm and "MSM" in RTCM_MSGIDS[self.identity]:
~~~~~~~~~~~^^^^^^^^^^^^^^^
`

Saving L-band config into D9S

Is your feature request related to a problem? Please describe.
There doesn't seem to be a way to save L band configuration info loaded into the NEO-D9S via the SPRTN configuration window.

I was able to set the D9S parameters, but couldn't figure out how to save them to BBRAM/Flash.

Describe the solution you'd like

An option to save the D9S configuration in the SPRTN window.

Describe alternatives you've considered

I think the only way you could currently save the D9S config is to disconnect from it in the SPRTN window, then reconnect on the main window, go to the UBX config window, and do save config there. That seems a bit risky, though, as you can't be sure nothing has changed in the connect/reconnect process.

Would you be willing to contribute a test device?

I only have one D9S at the moment, but I'm happy to test the code.

Support TCP connection to ublox receiver

Is your feature request related to a problem? Please describe.

Can't configure connection to a remote ublox receiver via TCP.

Describe the solution you'd like

Allow configuration of communication via a TCP socket in addition to serial. In this case a remote F9P receiver is connected to a headless server and socat used to bridge UART<->TCP.

Describe alternatives you've considered

U-Center can use a TCP socket for communication with the receiver, but is Windows only.

Would you be willing to contribute a test device?

Yes, as above.

Issues connecting to GPS device

Hi,

I'm trying to use PyGPSClient on Artix Linux and I'm encountering some issues. The GPS device I have is this one and I installed PyGPSClient using pip as described in the github readme (python -m pip install --upgrade PyGPSClient).

The first issue is that I can't seem to run the application without root/sudo. The docs say to add my user to the tty group (there is no dialout group on my system), and I did that but PyGPSClient still says it cannot connect to the device:
image

I also tried changing the permissions for /dev/ttyACM0 using udev rules, like this one
KERNEL=="ttyACM[0-9]*",NAME="tts/ACM%n",SYMLINK+="%k",GROUP="tty",MODE="0666"
but I still couldn't connect to the GPS device. Is something mis-configured on my machine or is there a PyGPSClient issue?

Another problem is that even if I connect as root, the connection to the device seems to drop at random. It takes anywhere between 2-3 seconds to 30 seconds to get a status bar message saying "End of file reached":
image

Sometimes I see an error saying that the device returned no data:
image

I also see this error printed out several times in the console where I start PyGPSClient from:

 Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/usr/lib/python3.10/site-packages/pygpsclient/serial_handler.py", line 324, in on_read
    self._parse_data()
  File "/usr/lib/python3.10/site-packages/pygpsclient/serial_handler.py", line 350, in _parse_data
    (raw_data, parsed_data) = self._reader.read()
  File "/usr/lib/python3.10/site-packages/pyubx2/ubxreader.py", line 130, in read
    raise ube.UBXStreamError(f"Unknown protocol {byte1 + byte2}.")
pyubx2.exceptions.UBXStreamError: Unknown protocol b'$6'.

Other GPS apps work fine, I'm seeing these issues only with PyGPSClient and I'm not sure if these are bugs or problems with my machine/OS. Any help is greatly appreciated.
Thank you.

Raspberry Pi 32-bit

Discussed in #83

Originally posted by acbtones August 4, 2023
Hi,

Firstly, thanks for the great software!
However, I can't get it to install on Raspberry Pi 32-bit OS.
Using a RPi 3, I installed 32bit OS ("Raspberry Pi OS Full (32-bit)") and tried the installation - log attached: 32bit_pygpsclient.log
Cryptography fails to install so the PyGPSClient install fails.
Is that related to this: pyca/cryptography#5766 (comment)
I think that's why previous discussions in this forum have suggested Rust is required.
Using the same RPi 3, I installed 64-bit OS ("Raspberry Pi OS (64-bit)") and tried the installation - log attached: 64bit_pygpsclient.log
Successful installation.

My wish is to add PyGPSClient to an existing 32-bit RPi installation running other software that will only run on 32-bit.

Also, when starting PyGPSClient, is it possible to start the stream immediately i.e. without clicking the USB button?

Thanks,

Anthony

32bit_pygpsclient.log
64bit_pygpsclient.log

Accuracy Estimate Reporting

Is your feature request related to a problem? Please describe.
Not a problem, just an idea. It would be really nice to have displayed the current estimate of the filter position accuracy. For example, in U-Center when you're in RTK-Fix you can see that your (reported) accuracy is 0.035m for example, which is very helpful. The reason this is helpful is that RTK-Fix has a fairly wide range of expected accuracy, say 0.015m to more than 0.050m. So this gives you an indication of how well your RTK-Fix lock is that day. Same is true for RTK-Float. [By the way, terrific tool, MUCH easier and more reliable than U-Center!]

A clear and concise description of what the problem is e.g. I'd like to be able to do this [...]

Describe the solution you'd like

A clear and concise description of what you want to happen.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Would you be willing to contribute a test device?

If the request relates to a specific u-blox device that is not currently supported, would you be
willing to contribute a device to the project for testing purposes?

Additional context

Add any other context about the feature request here.

Incorrect PUBX03 elev/azim handling in Sky View

PyGPSClient Bug Report Template

NB: Please raise any general queries in the pygpsclient Discussions Channels in the first instance.

Describe the bug

(Reported via email by Matti Öhman)

The Satellite (Sky) view oscillates between two different states when both GPGSV and PUBX03 (UBX03) are enabled:

This seems bad:
image1

... while this looks OK:
image2

The parsed data seems to be valid, so the problem is probably in the _process_UBX03() funcion (nmea_handler.py).

The function makes a dictionary of tuples:
gsv_dict[key] = (
gnss,
svid,
getattr(data, f"azi_{i+1:02}"),
getattr(data, f"ele_{i+1:02}"),
str(getattr(data, f"cno_{i+1:02}")),
now,
)

Later it moves the tuples around:
for key in gsv_dict:
self.gsv_log[key] = gsv_dict[key]

... and unpacks the tuples back into variables:
for key in self.gsv_log:
gnssId, svid, elev, azim, snr, lastupdate = self.gsv_log[key]

The 3rd and 4th fields are swapped, i.e. the elevation and azimuth have switched places!

It might be useful to have an assert statement to check that a satellite's elevation never exceeds 90 degrees.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.