Skip to content

create_net_from_spec: Parsing error #110

@michaelwand

Description

@michaelwand

create_net_from_spec causes a parsing error depending on the presence or absence of whitespace, which is not according to the documentation ("Whitespace is allowed everywhere and will be completely ignored.").

Example script to reproduce the error:

import brainstorm as bs
print('This works')
net = bs.tools.create_net_from_spec('classification',4,5,'Ft200 D Ft200 D Ft200')
print('This does not work')
net = bs.tools.create_net_from_spec('classification',4,5,'Ft200DFt200DFt200')
print('Never reached')

Output:

This works
This does not work
Traceback (most recent call last):
File "DoSomething.py", line 15, in
net = bs.tools.create_net_from_spec('classification',4,5,'Ft200DFt200DFt200')
File "build/bdist.linux-x86_64/egg/brainstorm/tools.py", line 614, in create_net_from_spec
File "build/bdist.linux-x86_64/egg/brainstorm/tools.py", line 498, in create_layer
KeyError: 'DF'

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