parse a FBO file
davidwul opened this issue · comments
I'm trying to parse a FBO file, but when I execute: netsgiro.parse(data)
I have an error: ValueError: time data '000000' does not match format '%d%m%y'
Any idea what is going wrong?
here is a sample of my FBO file:
NY000010000080805594114000000000000000000000000000000000000000000000000000000000
NY212420000000000000017114300824766000000000000000000000000000000000000000000000
NY21947000000012 71484800069387N00000000000000000000000000000000000000
NY21947000000022 71864800104450N00000000000000000000000000000000000000
NY212488000000020000000400000000000000000000000000000000000000000000000000000000
NY000089000000020000000600000000000000000000000000000000000000000000000000000000
When formatted with correct spacing, this runs fine for me:
import netsgiro
example = """
NY000010000080805594114000000000000000000000000000000000000000000000000000000000
NY212420000000000000017114300824766000000000000000000000000000000000000000000000
NY21947000000012 71484800069387 N00000000000000000000000000000000000000
NY21947000000022 71864800104450 N00000000000000000000000000000000000000
NY212488000000020000000400000000000000000000000000000000000000000000000000000000
NY000089000000020000000600000000000000000000000000000000000000000000000000000000
"""
p = netsgiro.parse(example)
What package version are you on, and does this example run for you?
I have the same issue,
here is my pip list:
attrs 22.1.0
backports.zoneinfo 0.2.1
bcrypt 3.2.2
certifi 2021.10.8
cffi 1.15.0
chardet 4.0.0
charset-normalizer 2.0.12
colorama 0.4.4
coloredlogs 15.0.1
cryptography 36.0.1
greenlet 1.1.2
humanfriendly 10.0
idna 3.3
img2pdf 0.4.3
importlib-resources 5.4.0
lxml 4.7.1
netsgiro 2.0.0
ocrmypdf 13.1.1
OdooRPC 0.8.0
paramiko 2.11.0
pdfminer.six 20211012
pikepdf 4.2.0
Pillow 8.4.0
pip 22.2.2
pluggy 1.0.0
pycparser 2.21
pymssql 2.2.5
PyNaCl 1.5.0
pyodbc 4.0.34
pyreadline3 3.3
reportlab 3.6.3
requests 2.27.1
setuptools 49.2.1
six 1.16.0
SQLAlchemy 1.4.39
tqdm 4.62.3
tzdata 2022.2
urllib3 1.26.9
wheel 0.37.0
zipp 3.6.0
I'm working on a windows machine
You're right, v2 has this issue. v1.3.0 does not 👍
Seems like nets_date should use the to_date_or_none
converter, rather than the to_date
one.
Before the v2 release, it also used to_date
, but the old version of the converter matches the new to_date_or_none
. I'll fix and release a new version shortly.
Would you mind testing with pip install git+https://github.com/otovo/python-netsgiro@fix-90
to see if it resolves the issue for you @davidwul?
Hey,
thanks a lot, it worked fine now. 👍
Great reactivty and thanks for this usefull lib
Version 2.0.1 should be out now. Let me know if you run into any other issues 🙂