# Bug in SR23 RC : Error with adding text objects in python

**URL:** <https://discourse.mcneel.com/t/bug-in-sr23-rc-error-with-adding-text-objects-in-python/96647>\
**Category:** Scripting\
**Created:** [February 18, 2020, 10:25am UTC](https://discourse.mcneel.com/t/bug-in-sr23-rc-error-with-adding-text-objects-in-python/96647 "2020-02-18T10:25:28Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Holo](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/holo/32/496872_2.png) [@Holo](https://discourse.mcneel.com/u/Holo)\
**Post date:** [February 18, 2020, 10:25am UTC](https://discourse.mcneel.com/t/bug-in-sr23-rc-error-with-adding-text-objects-in-python/96647/1 "2020-02-18T10:25:28Z")

</div>

Hi guys,  
@stevebaer @wim

it seems you have changed something that makes adding text objects requiring a font to be defined.  
This causes scripts that has worked for over a year to suddenly fail and is a problem.

I don’t think it’s OK to change stuff like that in a minor SR (nor in a bigger update as going from V6 to V7 either actually) since Rhino is more or less auto updated, and thus this causes issues for those who has scripts that uses text objects with default fonts in production.

Note: rs.AddText() says it has font as OPTIONAL.

So if you want to change something then do it behind the scene adding Arial as default if nothing is defined by the user.

---

<div class="post-metadata">

**Author:** ![wim](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/wim/32/747482_2.png) [@wim](https://discourse.mcneel.com/u/wim)\
**Post date:** [February 18, 2020, 10:31am UTC](https://discourse.mcneel.com/t/bug-in-sr23-rc-error-with-adding-text-objects-in-python/96647/2 "2020-02-18T10:31:45Z")

</div>

Hei Jørgen,  
I know there have been bug-fixes for issues with using text strings using scripting. Perhaps one of these had unforeseen side-effects…

Do you know specifically which SR worked one way and which SR then changed? Also, do you have a snippet that I can run to reproduce the issue? I can then try and find out which change cause this to happen.  
-wim

---

<div class="post-metadata">

**Author:** ![Holo](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/holo/32/496872_2.png) [@Holo](https://discourse.mcneel.com/u/Holo)\
**Post date:** [February 18, 2020, 1:44pm UTC](https://discourse.mcneel.com/t/bug-in-sr23-rc-error-with-adding-text-objects-in-python/96647/3 "2020-02-18T13:44:16Z")

</div>

SR22 works fine.  
My brother had “service release candidate” update on, and therefore got the problem while I still don’t 🙂 Lycky for you, unlucky for us 😉 (I just added 'font=“Arial” ’ to the two most important scripts for him, but I would dread doing that to ALL scripts we have for Rhino 6 😑

Cheers!

---

<div class="post-metadata">

**Author:** ![stevebaer](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/stevebaer/32/473567_2.png) [@stevebaer](https://discourse.mcneel.com/u/stevebaer)\
**Post date:** [February 18, 2020, 4:52pm UTC](https://discourse.mcneel.com/t/bug-in-sr23-rc-error-with-adding-text-objects-in-python/96647/4 "2020-02-18T16:52:51Z")

</div>

That’s great; our release candidate system is working as this is exactly what we try to find and fix during the release candidate period. @wim please make a stop-ship YT issue for this and let @Alain know about it.

---

<div class="post-metadata">

**Author:** ![wim](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/wim/32/747482_2.png) [@wim](https://discourse.mcneel.com/u/wim)\
**Post date:** [February 18, 2020, 5:43pm UTC](https://discourse.mcneel.com/t/bug-in-sr23-rc-error-with-adding-text-objects-in-python/96647/5 "2020-02-18T17:43:20Z")

</div>

Filed as [RH-57075](https://mcneel.myjetbrains.com/youtrack/issue/RH-57075).  
-w

---

<div class="post-metadata">

**Author:** ![Alain](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/alain/32/512812_2.png) [@Alain](https://discourse.mcneel.com/u/Alain)\
**Post date:** [February 18, 2020, 8:42pm UTC](https://discourse.mcneel.com/t/bug-in-sr23-rc-error-with-adding-text-objects-in-python/96647/6 "2020-02-18T20:42:14Z")

</div>

Hi @Holo . I don’t see the problem. Can you supply a code sample?  
Thanks

---

<div class="post-metadata">

**Author:** ![Holo](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/holo/32/496872_2.png) [@Holo](https://discourse.mcneel.com/u/Holo)\
**Post date:** [February 18, 2020, 9:45pm UTC](https://discourse.mcneel.com/t/bug-in-sr23-rc-error-with-adding-text-objects-in-python/96647/7 "2020-02-18T21:45:45Z")

</div>

Maybe tomorrow, we hurried off to the cabin to do some skiing… 😀

---

<div class="post-metadata">

**Author:** ![Holo](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/holo/32/496872_2.png) [@Holo](https://discourse.mcneel.com/u/Holo)\
**Post date:** [March 12, 2020, 5:52pm UTC](https://discourse.mcneel.com/t/bug-in-sr23-rc-error-with-adding-text-objects-in-python/96647/8 "2020-03-12T17:52:07Z")

</div>

Hi guys, this seems to not be working in the latest SR.  
(It worked in the last RC for the SR though…)

I have to add font=‘Arial’ to the rs.addtext() commands again.  
Can you check if that is true in your inhouse build too?  
I am on **Version 6 SR23** (6.23.20055.13111, 02/24/2020)

---

<div class="post-metadata">

**Author:** ![Holo](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/holo/32/496872_2.png) [@Holo](https://discourse.mcneel.com/u/Holo)\
**Post date:** [March 12, 2020, 6:41pm UTC](https://discourse.mcneel.com/t/bug-in-sr23-rc-error-with-adding-text-objects-in-python/96647/9 "2020-03-12T18:41:43Z")

</div>

Hm, something phoney is going on. I restarted Rhino and now the script on a button with rs.addtext() without font=‘Arial’ added suddenly worked. Maybe something is stuck in Rhino’s elevated memory. I’ll restart the computer and check if it still works.

This is strange… now it works, and an hour ago it worked on neither of our machines and I had to update a script, but then the rui file failed to save (since dropbox was busy) and the change was discarded, but now it works. This is odd, so I guess you can ignore this for now, and I’ll keep you posted if I find anything that is repeatable or that otherwise makes sense regarding this.  
Cheers!

---

<div class="post-metadata">

**Author:** ![Alain](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/alain/32/512812_2.png) [@Alain](https://discourse.mcneel.com/u/Alain)\
**Post date:** [March 12, 2020, 8:13pm UTC](https://discourse.mcneel.com/t/bug-in-sr23-rc-error-with-adding-text-objects-in-python/96647/10 "2020-03-12T20:13:06Z")

</div>

I did a quick test just to confirm and I don’t see the problem. Yes, please let me know if you can repeat it.  
Cheers
