Problem with dialog boxes

Hello I’m pretty new with Psychopy and Python in general. I have a Mac and I’m having issues with opening dialog boxes
I’m just trying the example code from the website:

 expInfo = {'observer':'jwp', 'refOrientation':0}
 expInfo['dateStr'] = data.getDateStr()
 dlg = gui.DlgFromDict(expInfo, title='simple JND Exp', fixed=['dateStr'])

And I get the next error

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psychopy/gui/wxgui.py", line 248, in __init__
    Dlg.__init__(self, title)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psychopy/gui/wxgui.py", line 64, in __init__
    wx.Dialog.__init__(self, None, -1, title, pos, size, style)
TypeError: Dialog(): arguments did not match any overloaded call:
  overload 1: too many arguments
  overload 2: argument 4 has unexpected type 'NoneType'

I think it is a problem with xwPython and the gui from Psychopy but I don’t know how to solve it
Thanks for your attention.

Also when I import gui from PsychoPy it runs the Python Launcher and I don’t know if it should happen…

What happens when you run your code from within the Coder view of the PsychoPy standalone application?

When I run it in the standalone application it works perfectly, so I don’t understand why it doesn’t in the terminal

Because the standalone distribution has its own complete Python installation along with all of the other required dependencies. When you are running it from the terminal, you are using your own system version of Python, and have to handle all of the issues with dependency versions and conflicts yourself.

There should be a way to run a script from the terminal and still get it run with your standalone version of Python though.