Project

General

Profile

Actions

Bug #2087

open

Windows: Serial port handle not freed after exception thrown in chirpw

Added by Patrick Lang almost 10 years ago. Updated almost 10 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
11/30/2014
Due date:
% Done:

0%

Estimated time:
Chirp Version:
daily
Model affected:
(All models)
Platform:
Windows
Debug Log:
I read the instructions above:

Description

If an exception is thrown from the radio class, the serial port is not closed. If you try to do another download or upload, then you will get an access denied error

C:\hg\chirp.hg>python chirpw
CHIRP 0.3.0dev on WinVista/7 (Python 2.7.8)
Registered Alinco_DR03T = DR03Radio
--- snipped ---
Registered Kenwood_TM-D710 = TMD710Radio
Registered Kenwood_TH-D72_live_mode = THD72Radio
Registered Kenwood_TM-V71 = TMV71Radio
Registered Kenwood_TH-K2 = THK2Radio
Registered Kenwood_TM-271 = TM271Radio
--- snipped ---
Registered Wouxun_KG-818 = KG818Radio
--- snipped ---
Skipping existing stock config
User selected Kenwood TM-D710 on port COM4
Trying ID at baud 9600
PC->RADIO: ID
D7->PC: ID TM-D710G
Traceback (most recent call last):
File "C:\hg\chirp.hg\chirpui\mainapp.py", line 1391, in mh
self.do_download(*args)
File "C:\hg\chirp.hg\chirpui\mainapp.py", line 663, in do_download
radio = settings.radio_class(ser)
File "C:\hg\chirp.hg\chirp\kenwood_live.py", line 126, in init
self.MODEL))
Exception: Radio reports TM-D710G (not TM-D710)
User selected Kenwood TM-D710 on port COM4
--- Exception Dialog: could not open port COM4: [Error 5] Access is denied. ---
Traceback (most recent call last):
File "C:\hg\chirp.hg\chirpui\mainapp.py", line 655, in do_download
timeout=0.25)
File "C:\Python27\lib\site-packages\serial\serialwin32.py", line 30, in init
__
SerialBase.
init_(self, *args, **kwargs)
File "C:\Python27\lib\site-packages\serial\serialutil.py", line 260, in __init
_

self.open()
File "C:\Python27\lib\site-packages\serial\serialwin32.py", line 56, in open
raise SerialException("could not open port %s: %s" % (self.portstr, ctypes.W
inError()))

SerialException: could not open port COM4: [Error 5] Access is denied.

Actions

Also available in: Atom PDF