Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

37 CFR 1 - problem adding § 1.109 from FR 05-461 #383

@gregoryfoster

Description

@gregoryfoster

(Identified by @cmc333333 in #379)

Dev environment: current master [ 8366bcf ].

The 37 CFR 1 parse currently fails on FR 05-461 when attempting to add § 1.109.

To reproduce:

eregs clear
rm -rf .eregs_index   # bug, see #382
eregs --debug pipeline 37 1 output

You'll be dropped into the debugger at
regparser/notice/compiler.py:195 in add_child(). The error is reported as:

TypeError: '<' not supported between instances of 'int' and 'str'

The new_el_sort variable contains the new section number as an integer, whereas the sort_order list contains tuples composed of strings:

ipdb> p new_el_sort
(109,)
ipdb> type(new_el_sort)
<class 'tuple'>
ipdb> type(new_el_sort[0])
<class 'int'>
ipdb> type(sort_order)
<class 'list'>
ipdb> type(sort_order[0])
<class 'tuple'>
ipdb> type(sort_order[0][0])
<class 'str'>

I'm definitely not sure, but it looks like the wrong parent node(s) are given to this function (Subpart A?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions