Fix small glitches
This commit is contained in:
2
.github/ISSUE_TEMPLATE/document-issues.md
vendored
2
.github/ISSUE_TEMPLATE/document-issues.md
vendored
@@ -8,7 +8,7 @@ assignees: ''
|
||||
<!--
|
||||
This repository is intended for software developers with experience managing Python programs. We will not respond to requests related to development challenges or difficulties in using the software.
|
||||
|
||||
Generic reports that do not reference specific wording in the README will not be addressed.
|
||||
This section is only for document issues and related improvement requests (not for software). Generic reports that do not reference specific wording in the README will not be addressed.
|
||||
|
||||
Please do not expect immediate responses. We will review cases only when it is feasible to do so.
|
||||
-->
|
||||
|
||||
@@ -16,5 +16,8 @@ A clear and concise description of the bug, including steps to reproduce the beh
|
||||
This option is only for software bugs.
|
||||
We do not accept questions about usage clarifications or requests about printers.
|
||||
|
||||
**Software version**
|
||||
The exact version of the tested software.
|
||||
|
||||
**Additional context**
|
||||
Feel free to add any other context about the problem here.
|
||||
|
||||
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -40,7 +40,9 @@ jobs:
|
||||
run: >
|
||||
echo "The *epson_print_conf.exe* executable file in the
|
||||
*epson_print_conf.zip* archive within the assets below is
|
||||
auto-generated by a [GitHub Action](.github/workflows/build.yml)."
|
||||
auto-generated by a [GitHub Action](.github/workflows/build.yml).\n\n
|
||||
Check the [History of modifications]
|
||||
(https://github.com/Ircama/epson_print_conf/commits/main/)."
|
||||
> ${{ github.workspace }}-CHANGELOG.txt
|
||||
|
||||
- name: Create Release, uploading the epson_print_conf.zip asset
|
||||
@@ -50,7 +52,7 @@ jobs:
|
||||
body_path: ${{ github.workspace }}-CHANGELOG.txt
|
||||
files: dist/epson_print_conf.zip
|
||||
append_body: true
|
||||
generate_release_notes: true
|
||||
generate_release_notes: false
|
||||
|
||||
- name: Remove old releases
|
||||
uses: Nats-ji/delete-old-releases@v1
|
||||
|
||||
@@ -26,7 +26,7 @@ try:
|
||||
import importlib.machinery
|
||||
except ImportError:
|
||||
pass
|
||||
from pysnmp.hlapi.v1arch import *
|
||||
from pysnmp.hlapi.v1arch import * # this imports UdpTransportTarget
|
||||
|
||||
from pyasn1.type.univ import OctetString as OctetStringType
|
||||
from itertools import chain
|
||||
@@ -263,36 +263,6 @@ class EpsonPrinter:
|
||||
},
|
||||
"serial_number": range(192, 202),
|
||||
},
|
||||
"""
|
||||
"L3250": {
|
||||
"alias": ["L3251", "L3253", "L3255"],
|
||||
"read_key": [74, 54],
|
||||
"write_key": b'Maribaya',
|
||||
"serial_number": range(1604, 1614),
|
||||
"main_waste": {"oids": [48, 49, 47], "divider": 63.45},
|
||||
"second_waste": {"oids": [50, 51, 47], "divider": 34.15},
|
||||
"third_waste": {"oids": [252, 253, 254], "divider": 13},
|
||||
"raw_waste_reset": {
|
||||
48: 0, 49: 0, 47: 0, 52: 0, 53: 0, 54: 94, 50: 0, 51: 0,
|
||||
55: 94, 28: 0, 252: 0, 253: 0, 254: 0, 255: 94
|
||||
},
|
||||
"last_printer_fatal_errors": [
|
||||
289, 288, 291, 290, 293, 292, 295, 294, 297, 296, 1831, 1832,
|
||||
1833, 1834, 1835, 2037, 2036, 2039, 2038, 2041, 2040, 2043,
|
||||
2042, 2045, 2044],
|
||||
"stats": {
|
||||
"Maintenance required level of 1st waste ink counter": [54],
|
||||
"Maintenance required level of 2nd waste ink counter": [55],
|
||||
"Maintenance required level of 3rd waste ink counter": [255],
|
||||
"Manual cleaning counter": [90],
|
||||
"Timer cleaning counter": [89],
|
||||
"Power cleaning counter": [91],
|
||||
"Total print pass counter": [133, 132, 131, 130],
|
||||
"Total print page counter": [776, 775, 774, 773],
|
||||
"Total scan counter": [1843, 1842, 1841, 1840],
|
||||
},
|
||||
},
|
||||
"""
|
||||
"ET-2400": {
|
||||
"alias": ["ET-2401", "ET-2403", "ET-2405"],
|
||||
"read_key": [74, 54],
|
||||
@@ -1154,7 +1124,7 @@ class EpsonPrinter:
|
||||
)
|
||||
except Exception as e:
|
||||
logging.critical("snmp_mib invalid address: %s", e)
|
||||
quit(3)
|
||||
return None, False
|
||||
if self.timeout is not None:
|
||||
utt.timeout = self.timeout
|
||||
if self.retries is not None:
|
||||
|
||||
28
ui.py
28
ui.py
@@ -892,8 +892,14 @@ class EpsonPrinterUI(tk.Tk):
|
||||
|
||||
def load_from_file(self, file_type, type):
|
||||
# Open file dialog to select the file
|
||||
self.show_status_text_view()
|
||||
file_path = filedialog.askopenfilename(**file_type)
|
||||
self.config(cursor="watch")
|
||||
self.update_idletasks()
|
||||
self.update()
|
||||
if not file_path:
|
||||
self.config(cursor="")
|
||||
self.update_idletasks()
|
||||
self.show_status_text_view()
|
||||
self.status_text.insert(
|
||||
tk.END,
|
||||
@@ -905,6 +911,8 @@ class EpsonPrinterUI(tk.Tk):
|
||||
with open(file_path, 'rb') as pickle_file:
|
||||
self.conf_dict = pickle.load(pickle_file)
|
||||
except Exception as e:
|
||||
self.config(cursor="")
|
||||
self.update_idletasks()
|
||||
self.show_status_text_view()
|
||||
if not file_path.tell():
|
||||
self.status_text.insert(
|
||||
@@ -928,6 +936,7 @@ class EpsonPrinterUI(tk.Tk):
|
||||
):
|
||||
self.model_var.set(self.conf_dict["internal_data"]["default_model"])
|
||||
else:
|
||||
self.config(cursor="watch")
|
||||
self.status_text.insert(
|
||||
tk.END,
|
||||
f"[INFO] Converting file, please wait...\n"
|
||||
@@ -938,6 +947,7 @@ class EpsonPrinterUI(tk.Tk):
|
||||
if type == 2:
|
||||
printer_config = generate_config_from_toml(config=file_path)
|
||||
if not printer_config:
|
||||
self.config(cursor="")
|
||||
self.show_status_text_view()
|
||||
self.status_text.insert(
|
||||
tk.END,
|
||||
@@ -949,6 +959,8 @@ class EpsonPrinterUI(tk.Tk):
|
||||
conf_dict=self.conf_dict,
|
||||
replace_conf=self.replace_conf
|
||||
).valid_printers)
|
||||
self.config(cursor="")
|
||||
self.update_idletasks()
|
||||
if file_path:
|
||||
self.show_status_text_view()
|
||||
self.status_text.insert(
|
||||
@@ -1299,7 +1311,13 @@ Web site: https://github.com/Ircama/epson_print_conf
|
||||
return
|
||||
if not self.printer:
|
||||
return
|
||||
ser_num = self.printer.get_serial_number()
|
||||
try:
|
||||
ser_num = self.printer.get_serial_number()
|
||||
except Exception as e:
|
||||
self.handle_printer_error(e)
|
||||
self.config(cursor="")
|
||||
self.update_idletasks()
|
||||
return
|
||||
if not ser_num or "?" in ser_num:
|
||||
self.status_text.insert(
|
||||
tk.END,
|
||||
@@ -1332,7 +1350,13 @@ Web site: https://github.com/Ircama/epson_print_conf
|
||||
return
|
||||
if not self.printer:
|
||||
return
|
||||
mac_addr = self.printer.get_wifi_mac_address()
|
||||
try:
|
||||
mac_addr = self.printer.get_wifi_mac_address()
|
||||
except Exception as e:
|
||||
self.handle_printer_error(e)
|
||||
self.config(cursor="")
|
||||
self.update_idletasks()
|
||||
return
|
||||
if not mac_addr:
|
||||
self.status_text.insert(
|
||||
tk.END,
|
||||
|
||||
Reference in New Issue
Block a user