Error when using require "csv" in SketchUp 2024

Hi, when using “require csv” in SketchUp 2023, my extension works fine. But when using with SketchUp 2024, I received this error:

In Ruby console:

Error: #<fatal: exception reentered>

In RbzTools Catch error:

Load Error::SyntaxError
: syntax error, unexpected end-of-input

When remove row “require csv”, the error is gone but the extension 's not functionally.


This is not a real answer, but OpenCutList uses require 'csv' (source code) and works fine on SketchUp 2024.

1 Like

Thanks for your information.

As Boris says there should be quotes around the name csv - so it’s
'csv' or "csv"
And if you use the 'correct ’ Ruby syntax and put parentheses around it, then never insert a space…
So e.g. it’s

1 Like

That’ just a mistyping. I’m using require ‘csv’ in the code. The problem is the same code works fine in SketchUp 2023 but doesn’t work in 2024. And when remove it from the code, the error report doesn’t appear.

But with the confirmation from @boris.beaulant, I’ll checked another session. Thank you all.

I also have no problem loading the CSV library.

1 Like

Do you actually have the file csv.rb [and its related subfolder] in this folder ?
C:\Program Files\SketchUp\SketchUp 2024\Tools\RubyStdLib

Have you tried closing SketchUp, finding its installer’s exe file [in your Downloads], selecting its icon, right-clicking and ‘Run as administrator’… when prompted choose ‘Repair’.
Afterwards any missing files or awry permissions should get remade…

That’s a serious error. Something is definitely wrong.

The code string ().pos= isn’t contained in any csv related files. Also, I’m not familiar with ‘RbzTools’.

If you’re going to post error text in the forum, please post the complete text, as it’s impossible to guess what your problem is without it. You can change username, etc…

IIRC, Load Error::SyntaxError means that the file exists and was readable, but it contains a syntax error…

1 Like

Update. The error is gone after I restart my computer. Everything is OK now.

Thank you for all supports. This is a wrong alarm.

1 Like