Skip to content

Instantly share code, notes, and snippets.

@jpohhh
Created October 8, 2011 22:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpohhh/1272969 to your computer and use it in GitHub Desktop.
Save jpohhh/1272969 to your computer and use it in GitHub Desktop.
James-OLearys-MacBook:desktop jpo$ python coredata.py /Users/jpo/Dropbox/Work/Refulgent/Code/Ambur/Model/Waiter_Helper.xcdatamodeld/Waiter_Helper\ 18.xcdatamodel
/var/folders/23/tyg4p1m55sb3yg8xymp795bc0000gn/T/tmpGfaetE/model.mom
Traceback (most recent call last):
File "coredata.py", line 42, in <module>
entities = model.entities().sortedArrayUsingDescriptors_(descriptors)
AttributeError: 'NoneType' object has no attribute 'entities'
@cspickert
Copy link

Assuming coredata.py is this script, you should be running it on the .xcdatamodel package, not on the compiled .mom file. The script will compile the model in a temporary directory. For example:

python coredata.py /path/to/Model.xcdatamodel

Hope that helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment