HandyGuySoftware / dupReport

Email summary reporting tool for use with Duplicati backup system
MIT License
77 stars 9 forks source link

.RC File conversion failure. #152

Closed HandyGuySoftware closed 4 years ago

HandyGuySoftware commented 4 years ago
[root@MAGGIE ~]# /usr/bin/python3 /usr/share/dupReport/dupReport.py
Traceback (most recent call last):
  File "/usr/share/dupReport/dupReport.py", line 26, in <module>
    import dupapprise
  File "/usr/share/dupReport/dupapprise.py", line 15, in <module>
    import apprise
ModuleNotFoundError: No module named 'apprise'

All I did is copy the files into the same folder and ran the same command I do via cron.

Ok, so I installed “apprise” using “pip3 install apprise” and it gets further:

[root@MAGGIE ~]# /usr/bin/python3 /usr/share/dupReport/dupReport.py
Traceback (most recent call last):
  File "/usr/share/dupReport/dupReport.py", line 63, in <module>
    canContinue = options.initOptions()
  File "/usr/share/dupReport/options.py", line 711, in initOptions
    convert.convertRc(oMgr, currRcVersion)
  File "/usr/share/dupReport/convert.py", line 80, in convertRc
    doConvertRc(oMgr, fromVersion)
  File "/usr/share/dupReport/convert.py", line 221, in doConvertRc
    oMgr.setRcOption('outgoing', option[3:], optVal)
  File "/usr/share/dupReport/options.py", line 509, in setRcOption
    self.parser.set(section, option, value)
  File "/usr/lib64/python3.8/configparser.py", line 1200, in set
    self._validate_value_types(option=option, value=value)
  File "/usr/lib64/python3.8/configparser.py", line 1185, in _validate_value_types
    raise TypeError("option values must be strings")
TypeError: option values must be strings
Taomyn commented 4 years ago

@HandyGuySoftware here's my .rc file from my backup

[main]
dbpath = /usr/share/dupReport
logpath = /usr/share/dupReport
verbose = 1
logappend = false
subjectregex = ^Duplicati Backup report for
srcregex = \w*
destregex = \w*
srcdestdelimiter = -
dateformat = DD/MM/YYYY
timeformat = HH:MM:SS
warnoncollect = true
applyutcoffset = true
show24hourtime = true
purgedb = false
showprogress = 0
masksensitive = true
markread = true
rcversion = 3.0.0

[incoming]
intransport = imap
inserver = mail.mydomain.com
inport = 4993
inencryption = tls
inaccount = mservices@mydomain.com
inpassword = **password containing special characters**
infolder = Duplicati
inkeepalive = true
unreadonly = false

[outgoing]
outserver = mail.mydomain.com
outport = 587
outencryption = tls
outaccount = mservices@mydomain.com
outpassword = **password containing special characters**
outsender = dupReport@mydomain.com
outreceiver = ferd@mydomain.com
outkeepalive = true

[report]
style = srcdest
sortby = source
border = 1
padding = 5
reporttitle = Duplicati Backup Summary Report
sizedisplay = mega
showsizedisplay = true
displaymessages = false
displaywarnings = true
displayerrors = true
titlebg = #FFFFFF
subheadbg = #D3D3D3
jobmessagebg = #FFFFFF
jobwarningbg = #FFFF00
joberrorbg = #FF0000
repeatheaders = true
nobackupwarn = 3
nbwsubject = Backup Warning: #SOURCE##DELIMITER##DESTINATION# Backup Not Seen for #DAYS# Days
lastseensummary = top
lastseensummarytitle = Backup Sets Last Seen
lastseenlow = 5
lastseenmed = 10
lastseenlowcolor = #FFFF00
lastseenmedcolor = #FF4500
lastseenhighcolor = #FF0000
truncatemessage = 0
truncatewarning = 0
truncateerror = 0
durationzeroes = true
displaylogdata = true
joblogdatabg = #FF0000
truncatelogdata = 0

[headings]
source = Source
destination = Destination
date = Date
time = Time
duration = Duration
files = Files
filesplusminus = +/-
size = Size
sizeplusminus = +/-
added = Added
deleted = Deleted
modified = Modified
errors = Errors
result = Result
jobmessages = Messages
jobwarnings = Warnings
joberrors = Errors
dupversion = Version
joblogdata = Log Data
HandyGuySoftware commented 4 years ago

It appears that the new email server sections have a sendername= option that is not present in previous .rc file versions. Nor is it mentioned in the new documentation. Have corrected both issues.

HandyGuySoftware commented 4 years ago

There is a new Issue_152 branch in the code that should correct the problem. Please check it out and see if that corrects your issue.

Taomyn commented 4 years ago

@HandyGuySoftware I restored the files from my backup, applied the new update and was able to run it successfully. Nothing was reported on the command line, I saw no errors in the log file, the mailbox was caught up by the process and the report was emailed to me as normal.

HandyGuySoftware commented 4 years ago

Updated 3.0.0 code to 3.0.0 Update Release 1.