View Single Post
Old 03-19-2019, 01:38 AM   #25
nir.arad
Human being with feelings
 
Join Date: Dec 2018
Posts: 15
Default

Hi @romeo_despres

I'm also having issue running reapy outside of Reaper (on Mac).
Inside Reaper the following code works.

Code:
import reapy
reapy.print("Hello world!")

Error
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py", line 605, in run
    testMethod()
  File "/p4client/Automation/main_branch/Packages/apps/audio_apps/reaper.py", line 15, in test_reapy
    reapy.print("Hello world!")
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/reapy/core/reaper/reaper.py", line 281, in print
    show_console_message(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/reapy/core/reaper/reaper.py", line 418, in show_console_message
    RPR.ShowConsoleMsg(txt)
AttributeError: module 'reapy.reascript_api' has no attribute 'ShowConsoleMsg'
I've tried using other python libraries and getting similar errors.
Something's definitely not set up correctly on my system.

Code:
sys.path.append('/Applications/REAPER64.app/Contents/Plugins')
import reaper_python as rp
rp.RPR_ShowConsoleMsg("Hello world!")


Error
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py", line 605, in run
    testMethod()
  File "/p4client/Automation/main_branch/Packages/apps/audio_apps/reaper.py", line 11, in test_reaper_python
    rp.RPR_ShowConsoleMsg("Hello world!")
  File "/Applications/REAPER64.app/Contents/Plugins/reaper_python.py", line 3381, in RPR_ShowConsoleMsg
    a=_ft['ShowConsoleMsg']
KeyError: 'ShowConsoleMsg'
nir.arad is offline   Reply With Quote