SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HPLIP |
New
|
Undecided
|
Unassigned |
Bug Description
Hi Team ,
I am having a bulk order production of printing using imx8 board , the number are 1000-3000 units a year . so kindly help us in printing usb for hp1108.
I am trying to print using imx8 board using usb with hpp1108 printer:- Following are the details of yocto
1. Your Linux Distribution and version.
repo init -u git://git.
HP Linux Imaging and Printing System (ver. 3.19.12)
Printer/Fax Setup Utility ver. 9.0
2. Your printer make/model
• HP_LaserJet_
3.hp-check -r
/usr/bin/
if 'getfacl' not in g and '' is not g and 'file' not in g:
Saving output in log file: /etc/cups/
HP Linux Imaging and Printing System (ver. 3.19.12)
Dependency/Version Check Utility ver. 15.1
Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.
Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling the HPLIP supplied tarball (.tar.gz
or .run) to determine if the proper dependencies are installed to successfully compile HPLIP.
2. Run-time check mode (-r or --run): Use this mode to determine if a distro supplied package (.deb, .rpm, etc)
or an already built HPLIP supplied tarball has the proper dependencies installed to successfully run.
3. Both compile- and run-time check mode (-b or --both) (Default): This mode will check both of the above cases
(both compile- and run-time dependencies).
Check types:
a. EXTERNALDEP - External Dependencies
b. GENERALDEP - General Dependencies (required both at compile and run time)
c. COMPILEDEP - Compile time Dependencies
d. [All are run-time checks]
PYEXT SCANCONF QUEUES PERMISSION
Status Types:
OK
MISSING - Missing Dependency or Permission or Plug-in
INCOMPAT - Incompatible dependency-version or Plugin-version
warning: tdx wayland with xwayland distro is not found in AUTH_TYPES
warning: 0-6.7.0-
---------------
| SYSTEM INFO |
---------------
Kernel: 5.15.148-
Host: apalis-
Proc: 5.15.148-
Distribution: 0 6.7.0-devel-
Bitness: 64 bit
-------
| HPLIP CONFIGURATION |
-------
HPLIP-Version: HPLIP 3.19.12
HPLIP-Home: /usr/share/hplip
warning: HPLIP-Installation: Auto installation is not supported for 0 distro 6.7.0-devel-
Current contents of '/etc/hp/
# hplip.conf. Generated from hplip.conf.in by configure.
[hplip]
version=3.19.12
[dirs]
home=/usr/
run=/var/run
ppd=/usr/
ppdbase=
doc=/usr/
html=/usr/
icon=/usr/
cupsbackend=
cupsfilter=
drv=/usr/
bin=/usr/bin
apparmor=
# Following values are determined at configure time and cannot be changed.
[configure]
network-build=no
libusb01-build=no
pp-build=no
gui-build=no
scanner-build=no
fax-build=no
dbus-build=no
cups11-build=no
doc-build=no
shadow-build=no
hpijs-install=no
foomatic-
foomatic-
foomatic-
hpcups-install=yes
cups-drv-
cups-ppd-
internal-
restricted-build=no
ui-toolkit=no
qt3=no
qt4=no
qt5=no
policy-kit=no
lite-build=no
udev_sysfs_rules=no
hpcups-
hpijs-only-build=no
apparmor_build=no
class-driver=no
Current contents of '/var/lib/
Plugins are not installed. Could not access file: No such file or directory
Current contents of '~/.hplip/
warning: Could not access file: No such file or directory
<Package-name> <Package-Desc> <Required/Optional> <Min-Version> <Installed-Version> <Status> <Comment>
-------
| External Dependencies |
-------
cups CUPS - Common Unix Printing System REQUIRED 1.1 2.4.2 OK 'CUPS Scheduler is running'
error: gs GhostScript - PostScript and PDF language interpreter and previewer REQUIRED 7.05 - MISSING 'gs needs to be installed'
error: xsane xsane - Graphical scanner frontend for SANE OPTIONAL 0.9 - MISSING 'xsane needs to be installed'
error: scanimage scanimage - Shell scanning program OPTIONAL 1.0 - MISSING 'scanimage needs to be installed'
dbus DBus - Message bus system REQUIRED - 1.14.8 OK -
error: policykit PolicyKit - Administrative policy framework OPTIONAL - - MISSING 'policykit needs to be installed'
network network -wget OPTIONAL - - OK -
avahi-utils avahi-utils OPTIONAL - 0.8 OK -
-------
| General Dependencies |
-------
error: libjpeg libjpeg - JPEG library REQUIRED - - MISSING 'libjpeg needs to be installed'
cups-devel CUPS devel- Common Unix Printing System development files REQUIRED - 2.4.2 OK -
cups-image CUPS image - CUPS image development files REQUIRED - 2.4.2 OK -
libpthread libpthread - POSIX threads library REQUIRED - b'2.35' OK -
libusb libusb - USB library REQUIRED - 1.0 OK -
error: sane SANE - Scanning library REQUIRED - - MISSING 'sane needs to be installed'
error: sane-devel SANE - Scanning library development files REQUIRED - - MISSING 'sane-devel needs to be installed'
error: libnetsnmp-devel libnetsnmp-devel - SNMP networking library development files REQUIRED 5.0.9 - MISSING 'libnetsnmp-devel needs to be installed'
libcrypto libcrypto - OpenSSL cryptographic library REQUIRED - 3.0.14 OK -
python3X Python 2.2 or greater - Python programming language REQUIRED 2.2 3.10.14 OK -
error: python3-notify2 Python libnotify - Python bindings for the libnotify Desktop notifications OPTIONAL - - MISSING 'python3-notify2 needs to be installed'
error: python3-pyqt4-dbus PyQt 4 DBus - DBus Support for PyQt4 OPTIONAL 4.0 - MISSING 'python3-pyqt4-dbus needs to be installed'
error: python3-pyqt4 PyQt 4- Qt interface for Python (for Qt version 4.x) REQUIRED 4.0 - MISSING 'python3-pyqt4 needs to be installed'
python3-dbus Python DBus - Python bindings for DBus REQUIRED 0.80.0 1.2.18 OK -
python3-xml Python XML libraries REQUIRED - 2.6.0 OK -
python3-devel Python devel - Python development files REQUIRED 2.2 3.10.14 OK -
Traceback (most recent call last):
File "/usr/bin/
num_errors, num_warns = dep.validate(
File "/usr/bin/
self.
File "/usr/bin/
installed_ver = self.core.
File "/usr/share/
return Image.PILLOW_
File "/usr/lib/
raise AttributeError(msg)
AttributeError: module 'PIL.Image' has no attribute 'PILLOW_VERSION'
4. A Detailed explanation of your problem
We have bitbake following commands .I am also sharing hplip_3.19.12.bb file for reference .We are still unable to print even though command is sent.
• Add the following in .bb file
" hplip cups \ pkgconfig \ python3 \ python3-pip \ python3-distro \ python3-dbus \ cups-doc \ cups-lib \ cups-libimage \ cups-filters \ hplip-ppd \ hplip-cups \ hplip-backend \ hplip-filter \ vsftpd \ "
• We have added meta- custom layer .
bitbake-layers add-layer ../sources/
Bitbake was successful.
Following command are working
# lpinfo -v
network beh
file cups-brf:/
network lpd
direct hp:/usb/
network socket
serial serial:
network ipp
network https
network ipps
network http
direct usb://HP/
direct hpfax
check the available printer drivers # lpinfo -m
-List all drivers add the printer name # lpadmin -p HP_LaserJet_
#add the printer name .ppd
lpadmin -p HP_LaserJet_
Now add the printer as the default printer # lpoptions -d HP_LaserJet_
Check the default printer
# lpstat -d
system default destination: HP_LaserJet_
Following command are not working
Now print a file/pdf
# lp -d HP_LaserJet_
5.apalis-
/usr/share/
if home_dir is "":
/usr/share/
if 'getfacl' not in g and '' is not g and 'file' not in g:
HP Linux Imaging and Printing System (ver. 3.19.12)
Self Diagnse Utility and Healing Utility ver. 1.0
Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.
HP Linux Imaging and Printing System (ver. 3.19.12)
Self Diagnse Utility and Healing Utility ver. 1.0
Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.
warning: tdx wayland with xwayland distro is not found in AUTH_TYPES
Checking for Deprecated items....
error: This distro (i.e unknown 6.7.0-devel-
The diagnosis is limited on unsupported platforms. Do you want to continue?(y=yes*, n=no):yes
error: Please enter 'y', 'n', 'q' or press <enter> for the default of 'y'.
The diagnosis is limited on unsupported platforms. Do you want to continue?(y=yes*, n=no):y
Checking for HPLIP updates....
sh: line 1: /usr/bin/
error: Failed to upgrade latest HPLIP. Is hp-upgrade already running (i.e. foreground or background)?
Checking for Dependencies....
warning: 0-6.7.0-
---------------
| SYSTEM INFO |
---------------
Kernel: 5.15.148-
Host: apalis-
Proc: 5.15.148-
Distribution: 0 6.7.0-devel-
Bitness: 64 bit
-------
| HPLIP CONFIGURATION |
-------
HPLIP-Version: HPLIP 3.19.12
HPLIP-Home: /usr/share/hplip
warning: HPLIP-Installation: Auto installation is not supported for 0 distro 6.7.0-devel-
Current contents of '/etc/hp/
# hplip.conf. Generated from hplip.conf.in by configure.
[hplip]
version=3.19.12
[dirs]
home=/usr/
run=/var/run
ppd=/usr/
ppdbase=
doc=/usr/
html=/usr/
icon=/usr/
cupsbackend=
cupsfilter=
drv=/usr/
bin=/usr/bin
apparmor=
# Following values are determined at configure time and cannot be changed.
[configure]
network-build=no
libusb01-build=no
pp-build=no
gui-build=no
scanner-build=no
fax-build=no
dbus-build=no
cups11-build=no
doc-build=no
shadow-build=no
hpijs-install=no
foomatic-
foomatic-
foomatic-
hpcups-install=yes
cups-drv-
cups-ppd-
internal-
restricted-build=no
ui-toolkit=no
qt3=no
qt4=no
qt5=no
policy-kit=no
lite-build=no
udev_sysfs_rules=no
hpcups-
hpijs-only-build=no
apparmor_build=no
class-driver=no
Current contents of '/var/lib/
Plugins are not installed. Could not access file: No such file or directory
Current contents of '~/.hplip/
[installation]
date_time = 04/28/22 17:58:45
version = 3.19.12
<Package-name> <Package-Desc> <Required/Optional> <Min-Version> <Installed-Version> <Status> <Comment>
-------
| External Dependencies |
-------
cups CUPS - Common Unix Printing System REQUIRED 1.1 2.4.2 OK 'CUPS Scheduler is running'
gs GhostScript - PostScript and PDF language interpreter and previewer REQUIRED 7.05 9.55.0 OK -
error: xsane xsane - Graphical scanner frontend for SANE OPTIONAL 0.9 - MISSING 'xsane needs to be installed'
error: scanimage scanimage - Shell scanning program OPTIONAL 1.0 - MISSING 'scanimage needs to be installed'
dbus DBus - Message bus system REQUIRED - 1.14.8 OK -
error: policykit PolicyKit - Administrative policy framework OPTIONAL - 0.119 MISSING 'policykit needs to be installed'
network network -wget OPTIONAL - - OK -
avahi-utils avahi-utils OPTIONAL - 0.8 OK -
-------
| General Dependencies |
-------
error: libjpeg libjpeg - JPEG library REQUIRED - - MISSING 'libjpeg needs to be installed'
cups-devel CUPS devel- Common Unix Printing System development files REQUIRED - 2.4.2 OK -
cups-image CUPS image - CUPS image development files REQUIRED - 2.4.2 OK -
libpthread libpthread - POSIX threads library REQUIRED - b'2.35' OK -
libusb libusb - USB library REQUIRED - 1.0 OK -
error: sane SANE - Scanning library REQUIRED - - MISSING 'sane needs to be installed'
error: sane-devel SANE - Scanning library development files REQUIRED - - MISSING 'sane-devel needs to be installed'
libnetsnmp-devel libnetsnmp-devel - SNMP networking library development files REQUIRED 5.0.9 5.9.3 OK -
libcrypto libcrypto - OpenSSL cryptographic library REQUIRED - 3.0.14 OK -
python3X Python 2.2 or greater - Python programming language REQUIRED 2.2 3.10.14 OK -
error: python3-notify2 Python libnotify - Python bindings for the libnotify Desktop notifications OPTIONAL - - MISSING 'python3-notify2 needs to be installed'
error: python3-pyqt4-dbus PyQt 4 DBus - DBus Support for PyQt4 OPTIONAL 4.0 - MISSING 'python3-pyqt4-dbus needs to be installed'
error: python3-pyqt4 PyQt 4- Qt interface for Python (for Qt version 4.x) REQUIRED 4.0 - MISSING 'python3-pyqt4 needs to be installed'
python3-dbus Python DBus - Python bindings for DBus REQUIRED 0.80.0 1.2.18 OK -
python3-xml Python XML libraries REQUIRED - 2.6.0 OK -
python3-devel Python devel - Python development files REQUIRED 2.2 3.10.14 OK -
Traceback (most recent call last):
File "/usr/bin/
num_errors, num_warns = dep.validate(
File "/usr/share/
self.
File "/usr/share/
installed_ver = self.core.
File "/usr/share/
return Image.PILLOW_
File "/usr/lib/
raise AttributeError(msg)
AttributeError: module 'PIL.Image' has no attribute 'PILLOW_VERSION'
apalis-
6. i am sharing my yocto image receipe :-
• python3 \
• python3-pip \
• python3-distro \
• python3-dbus \
• cups-dev \
• cups \
• cups-doc \
• cups-lib \
• cups-libimage \
• cups-dev \
• cups-filters \
• hplip \
• hplip-ppd \
• hplip-cups \
• hplip-backend \
• hplip-filter \
• vsftpd \
• ghostscript \
• libjpeg-turbo \
• net-snmp-dev \
• polkit \
• python3-pyqt5 \
• python3-pillow \
Still i am unable to print using usb