Re: [abjad-user] Re: bug? rtm parser returning an error while parsing trivial rhythm trees

11 views
Skip to first unread message

Trevor Bača

unread,
Jul 20, 2022, 11:06:09 AM7/20/22
to abjad...@googlegroups.com

Hi Pedro,

Thanks for this; I’ve committed a fix, and it will be included in Abjad 3.11.

Fixed output looks like this:

>>> import abjad
>>> abjad.rhythmtrees.parse_rtm_syntax("(3 (1 (1 (1 1)) 1))")
Container("c'4 c'8 c'8 c'4")

Trevor.


On Mon, Jul 11, 2022 at 8:04 PM Pedro Faria <pedrofa...@gmail.com> wrote:
can anyone help me?

Em quinta-feira, 28 de abril de 2022 às 13:45:00 UTC-3, Pedro Faria escreveu:
i have the following simple code (i'm studying the documentation and creating examples for myself):

import abjad
rtm = "(3 (1 (1 (1 1)) 1))"
tup = abjad.rhythmtrees.parse_rtm_syntax(rtm)
print(tup)

but i get an error:

Traceback (most recent call last):
  File "c:\Users\Pedro\Google Drive\Python_Scripts\additive_tuplets\explore_api.py", line 36, in <module>
    tup = abjad.rhythmtrees.parse_rtm_syntax(rtm)
  File "C:\Users\Pedro\AppData\Local\Programs\Python\Python310\lib\site-packages\abjad\rhythmtrees.py", line 911, in parse_rtm_syntax
    if tuplet.trivial():
AttributeError: 'Note' object has no attribute 'trivial'

is this a known issue?

--
You received this message because you are subscribed to the Google Groups "abjad-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to abjad-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/abjad-user/52c88a5c-990a-4857-b8b9-acecd9eafce7n%40googlegroups.com.


--
Reply all
Reply to author
Forward
0 new messages