TypeError if TEMPLATE_ROW_LIMIT not in config.ini #31

Closed
opened 2021-01-15 20:03:03 +00:00 by yulqen · 2 comments
yulqen commented 2021-01-15 20:03:03 +00:00 (Migrated from github.com)

When running datamaps import templates -m with no TEMPLATE_ROW_LIMIT in config.ini, TypeError is raised:

Traceback (most recent call last):
  File "/usr/lib/python3.9/concurrent/futures/process.py", line 243, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/usr/lib/python3.9/concurrent/futures/process.py", line 202, in _process_chunk
    return [fn(*args) for args in chunk]
  File "/usr/lib/python3.9/concurrent/futures/process.py", line 202, in <listcomp>
    return [fn(*args) for args in chunk]
  File "/home/lemon/code/python/bcompiler-engine/engine/utils/extraction.py", line 473, in template_reader
    if rowcnt > int(Config.TEMPLATE_ROW_LIMIT): 
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
"""
When running `datamaps import templates -m` with no TEMPLATE_ROW_LIMIT in `config.ini`, `TypeError` is raised: ```python""" Traceback (most recent call last): File "/usr/lib/python3.9/concurrent/futures/process.py", line 243, in _process_worker r = call_item.fn(*call_item.args, **call_item.kwargs) File "/usr/lib/python3.9/concurrent/futures/process.py", line 202, in _process_chunk return [fn(*args) for args in chunk] File "/usr/lib/python3.9/concurrent/futures/process.py", line 202, in <listcomp> return [fn(*args) for args in chunk] File "/home/lemon/code/python/bcompiler-engine/engine/utils/extraction.py", line 473, in template_reader if rowcnt > int(Config.TEMPLATE_ROW_LIMIT): TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType' """ ```
yulqen commented 2021-01-16 11:11:27 +00:00 (Migrated from github.com)

As of b43a545 TEMPLATE_ROW_LIMIT has been removed from config.ini. Need to implement CLI argument to implement the same.

As of b43a545 `TEMPLATE_ROW_LIMIT` has been removed from `config.ini`. Need to implement CLI argument to implement the same.
yulqen commented 2021-01-16 16:34:48 +00:00 (Migrated from github.com)

--rowlimit option has been added datamaps v1.1.0 which maps to adapter changes in bcompiler-engine.

`--rowlimit` option has been added `datamaps` v1.1.0 which maps to adapter changes in `bcompiler-engine`.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
yulqen/bcompiler-engine#31
No description provided.