Ousret / pyTeliumManager

Python library to manipulate Ingenico mobile payment device like iCT220 or iWL220 equipped with Telium Manager. RS232/USB.
http://pyteliummanager.readthedocs.io
MIT License
103 stars 20 forks source link

Test Case: test_tpe_autoget failes with: ValueError: Not a valid byte size: 1 #21

Closed JeanCarlosChavarriaHughes closed 3 years ago

JeanCarlosChavarriaHughes commented 3 years ago
$ ls -alh /dev/ttyACM0
crw-rw---- 1 root dialout 166, 0 Mar 19 10:42 /dev/ttyACM0

$ python test_tpe_autoget.py 
EException AttributeError: "'NoneType' object has no attribute 'is_open'" in <bound method Telium.__del__ of <telium.manager.Telium instance at 0x7603f198>> ignored

======================================================================
ERROR: test_auto_get (__main__.TestTPEAutoGet)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_tpe_autoget.py", line 13, in test_auto_get
    my_telium_instance = Telium.get()
  File "/home/pi/.local/lib/python2.7/site-packages/telium/manager.py", line 87, in get
    return Telium(probables[0], baudrate, timeout, open_on_create, debugging)
  File "/home/pi/.local/lib/python2.7/site-packages/telium/manager.py", line 65, in __init__
    timeout=timeout
  File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 220, in __init__
    self.bytesize = bytesize
  File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 306, in bytesize
    raise ValueError("Not a valid byte size: {!r}".format(bytesize))
ValueError: Not a valid byte size: 1

----------------------------------------------------------------------
Ran 1 test in 0.008s

FAILED (errors=1)

System Information:

$ python --version
Python 2.7.16

$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:    10
Codename:   buster

$ git log | head
commit d587d8edd713d929e0323d2a92546b5c60c2d52b
Author: TAHRI Ahmed R <Ousret@users.noreply.github.com>
Date:   Fri Feb 28 22:54:48 2020 +0100

    Improve setup.py and expose version in package (#13)

    Some python version were missing and the description was not included on PyPi. And fix minors issues.

commit 10c833df887af79b889a1ae58e68a7567de3632f
Author: TAHRI Ahmed R <nyuubi.10@gmail.com>
JeanCarlosChavarriaHughes commented 3 years ago

This is also present for python3


$ python3 test_tpe_autoget.py 
EException ignored in: <function Telium.__del__ at 0x75eff2b8>
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/pyTeliumManager-2.4.1-py3.7.egg/telium/manager.py", line 91, in __del__
AttributeError: 'NoneType' object has no attribute 'is_open'

======================================================================
ERROR: test_auto_get (__main__.TestTPEAutoGet)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_tpe_autoget.py", line 13, in test_auto_get
    my_telium_instance = Telium.get()
  File "/usr/local/lib/python3.7/dist-packages/pyTeliumManager-2.4.1-py3.7.egg/telium/manager.py", line 87, in get
    return Telium(probables[0], baudrate, timeout, open_on_create, debugging)
  File "/usr/local/lib/python3.7/dist-packages/pyTeliumManager-2.4.1-py3.7.egg/telium/manager.py", line 65, in __init__
    timeout=timeout
  File "/home/pi/.local/lib/python3.7/site-packages/serial/serialutil.py", line 220, in __init__
    self.bytesize = bytesize
  File "/home/pi/.local/lib/python3.7/site-packages/serial/serialutil.py", line 306, in bytesize
    raise ValueError("Not a valid byte size: {!r}".format(bytesize))
ValueError: Not a valid byte size: 1

----------------------------------------------------------------------
Ran 1 test in 0.011s

FAILED (errors=1)