Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help? #9

Open
ben-bay opened this issue Dec 23, 2019 · 0 comments
Open

help? #9

ben-bay opened this issue Dec 23, 2019 · 0 comments

Comments

@ben-bay
Copy link

ben-bay commented Dec 23, 2019

Running into a bug that doesn't exist when using the Python port of Tracery. When I call grammar.flatten on my rule I get this trace:

.../node_modules/tracery-grammar/tracery.js:657
                    var c = rule.charAt(i);
                                 ^

TypeError: rule.charAt is not a function
    at Object.parse (.../node_modules/tracery-grammar/tracery.js:657:34)
    at TraceryNode.expandChildren (.../node_modules/tracery-grammar/tracery.js:54:36)
    at TraceryNode.expand (.../node_modules/tracery-grammar/tracery.js:94:22)
    at Grammar.expand (.../node_modules/tracery-grammar/tracery.js:512:14)
    at Grammar.flatten (.../node_modules/tracery-grammar/tracery.js:520:25)
    at Object.<anonymous> (.../test_tracery.js:8:29)
    at Module._compile (internal/modules/cjs/loader.js:1139:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1159:10)
    at Module.load (internal/modules/cjs/loader.js:988:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)

What am I doing wrong??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant