Skip to content

Commit

Permalink
Bugfix for issue #85 reported by Colin Nichol.
Browse files Browse the repository at this point in the history
  • Loading branch information
markmac99 committed Mar 10, 2025
1 parent 3cc98d6 commit a92a67f
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 21 deletions.
42 changes: 24 additions & 18 deletions CMN_binViewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
from module_CAMS2CMN import convert_rmsftp_to_cams
from makeMP4 import makeMP4

version = "3.37.1"
version = "3.37.2"

# set to true to disable the video radiobutton
disable_UI_video = False
Expand Down Expand Up @@ -3377,24 +3377,30 @@ def confirmationEnd(self):

# write filtered UFO-compatible R91 csv file
if sys.version_info[0] > 2:
self.timestamp_label.configure(text = "Updating UFO file...")
try:
ufoFile = glob.glob(os.path.join(self.dir_path, '*.csv'))[0]

with open(ufoFile,'r') as uf:
ufoData = uf.readlines()
newufoData = self.updateUFOData(FTPdetectinfoExport, ufoData)

ufoName = os.path.split(self.dir_path)[1] + '.csv'
ufoFile = os.path.join(self.dir_path, ufoName)

if os.path.isfile(ufoFile):
self.timestamp_label.configure(text = "Updating UFO file...")
try:
_, ufof = os.path.split(ufoFile)
fnam = os.path.join(self.ConfirmationInstance.confirmationDirectory, ufof)
with open(fnam, 'w') as newUfoFile:
for line in newufoData:
newUfoFile.write(line)

except OSError as error:
log.info('unable to write CSV file, {}'.format(error))
except FileNotFoundError:
log.info('CSV file not present')
with open(ufoFile,'r') as uf:
ufoData = uf.readlines()
newufoData = self.updateUFOData(FTPdetectinfoExport, ufoData)
try:
_, ufof = os.path.split(ufoFile)
fnam = os.path.join(self.ConfirmationInstance.confirmationDirectory, ufof)
with open(fnam, 'w') as newUfoFile:
for line in newufoData:
newUfoFile.write(line)

except OSError as error:
log.info('unable to write CSV file, {}'.format(error))
except Exception:
log.info('UFO CSV file corrupt and cant be updated')
else:
log.info('UFO CSV file not present')

else:
print('ufo filtering doesnt work on Python 2.7')

Expand Down
2 changes: 1 addition & 1 deletion CMN_binViewer_setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

[Setup]
AppName=CMN_binViewer
AppVersion="3.37.1"
AppVersion="3.37.2"
AppPublisher=Croatian Meteor Network
AppPublisherURL=http://cmn.rgn.hr/
DefaultDirName={commonpf64}\CMN_binViewer
Expand Down
2 changes: 1 addition & 1 deletion CMN_binViewer_setup_win32.iss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

[Setup]
AppName=CMN_binViewer
AppVersion="3.37.1"
AppVersion="3.37.2"
AppPublisher=Croatian Meteor Network
AppPublisherURL=http://cmn.rgn.hr/
DefaultDirName={commonpf}\CMN_binViewer
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
CMN Binviewer Change Log
========================
3.37.2
Mar 25: Bugfix to trap case when RMS didn't create the UFO-format CSV file properly

3.37.1
Nov 24: Bugfix to support newer versions of numpy without np.int

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpver]
current_version = "3.37.1"
current_version = "3.37.2"
version_pattern = "MAJOR.MINOR.PATCH"

[bumpver.file_patterns]
Expand Down

0 comments on commit a92a67f

Please sign in to comment.