NameError: name 'PBXGenericObject' is not defined #185
Comments
I had this very same issue recently, change the name of your script from test.py to something else. The future libraries (python 3 compatibility) are the culprit here. |
Thanks for your reply. I tried your way, changed my
so what should i do ? |
I still see in the stacktrace a file called test.py that is being loaded.
…On Dec 1, 2017 1:02 PM, "justbilt" ***@***.***> wrote:
Thanks for your reply.
I tried your way, changed my test.py to a.py or something else, it still
no pass. I even tried those script in interactive command line:
iMac:package justbilt$ python
Python 2.7.10 (default, Oct 23 2015, 19:19:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pbxproj import XcodeProject
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/pbxproj/__init__.py", line 24, in <module>
from pbxproj.PBXGenericObject import PBXGenericObject
File "/Library/Python/2.7/site-packages/pbxproj/PBXGenericObject.py", line 6, in <module>
standard_library.install_aliases()
File "/Library/Python/2.7/site-packages/future/standard_library/__init__.py", line 483, in install_aliases
import test
File "/Users/justbilt/Documents/work/package/test.py", line 6, in <module>
File "/Library/Python/2.7/site-packages/pbxproj/XcodeProject.py", line 3, in <module>
from pbxproj.pbxextensions import *
File "/Library/Python/2.7/site-packages/pbxproj/pbxextensions/__init__.py", line 1, in <module>
from pbxproj.pbxextensions.ProjectFiles import *
File "/Library/Python/2.7/site-packages/pbxproj/pbxextensions/ProjectFiles.py", line 1, in <module>
from pbxproj.pbxsections import *
File "/Library/Python/2.7/site-packages/pbxproj/pbxsections/__init__.py", line 1, in <module>
from pbxproj.pbxsections.PBXBuildFile import *
File "/Library/Python/2.7/site-packages/pbxproj/pbxsections/PBXBuildFile.py", line 4, in <module>
class PBXBuildFile(PBXGenericObject):
NameError: name 'PBXGenericObject' is not defined
>>>
so what should i do ?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#185 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAfVI0_sW2s47IGgPooQydXPs1tnI1juks5s7-rGgaJpZM4QyJyx>
.
|
Oh my, unbelievable. You are right, thanks a lot ! |
Jesus I spent a few hours on this... thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Traceback:
test.py
Python version:
pbxproj version:
And it work fine when i changed
PBXBuildFile.py
:The text was updated successfully, but these errors were encountered: