Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError on Mac OS X 10.10 using python 2.7 #2

Closed
tomzx opened this issue Mar 15, 2016 · 5 comments
Closed

TypeError on Mac OS X 10.10 using python 2.7 #2

tomzx opened this issue Mar 15, 2016 · 5 comments
Assignees

Comments

@tomzx
Copy link

tomzx commented Mar 15, 2016

I've tried

Mac OS X 10.10.2 (Yosemite)

Traceback (most recent call last):
  File "/usr/local/bin/icon-font-to-png", line 8, in <module>
    from icon_font_to_png import command_line
  File "/Library/Python/2.7/site-packages/icon_font_to_png/__init__.py", line 2, in <module>
    from .icon_font_downloader import (
  File "/Library/Python/2.7/site-packages/icon_font_to_png/icon_font_downloader.py", line 15, in <module>
    class IconFontDownloader(object, with_metaclass(ABCMeta)):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/abc.py", line 87, in __new__
    cls = super(ABCMeta, mcls).__new__(mcls, name, bases, namespace)
TypeError: Error when calling the metaclass bases
    Cannot create a consistent method resolution
order (MRO) for bases NewBase, object

The following is the output of installing icon-font-to-png (and dependencies) using pip:

Downloading/unpacking icon-font-to-png
  Downloading icon_font_to_png-0.3.2-py2.py3-none-any.whl
Downloading/unpacking tinycss>=0.3 (from icon-font-to-png)
  Downloading tinycss-0.3.tar.gz (72kB): 72kB downloaded
  Running setup.py (path:/private/tmp/pip_build_root/tinycss/setup.py) egg_info for package tinycss
    Building without Cython.

    no previously-included directories found matching 'docs/_build'
Downloading/unpacking requests>=2.9.1 (from icon-font-to-png)
  Downloading requests-2.9.1-py2.py3-none-any.whl (501kB): 501kB downloaded
Downloading/unpacking pillow>=3.0.0 (from icon-font-to-png)
  Downloading Pillow-3.1.1-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (2.9MB): 2.9MB downloaded
Downloading/unpacking six>=1.10.0 (from icon-font-to-png)
  Downloading six-1.10.0-py2.py3-none-any.whl
Installing collected packages: icon-font-to-png, tinycss, requests, pillow, six
  Running setup.py install for tinycss
    Building without Cython.
    building 'tinycss.speedups' extension
    cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c tinycss/speedups.c -o build/temp.macosx-10.10-intel-2.7/tinycss/speedups.o
    tinycss/speedups.c:705:14: warning: explicitly assigning value of variable of type 'PyObject *' (aka 'struct _object *') to itself [-Wself-assign]
      __pyx_self = __pyx_self;
      ~~~~~~~~~~ ^ ~~~~~~~~~~
    tinycss/speedups.c:1571:14: warning: explicitly assigning value of variable of type 'PyObject *' (aka 'struct _object *') to itself [-Wself-assign]
      __pyx_self = __pyx_self;
      ~~~~~~~~~~ ^ ~~~~~~~~~~
    tinycss/speedups.c:5348:33: warning: unused function '__Pyx_PyInt_FromSize_t' [-Wunused-function]
    static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
                                    ^
    tinycss/speedups.c:5362:29: warning: unused function '__Pyx_PyInt_AsSize_t' [-Wunused-function]
    static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
                                ^
    tinycss/speedups.c:469:32: warning: unused function '__Pyx_GetItemInt_Tuple_Fast' [-Wunused-function]
    static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
                                   ^
    tinycss/speedups.c:509:26: warning: unused function '__Pyx_NegateNonNeg' [-Wunused-function]
    static CYTHON_INLINE int __Pyx_NegateNonNeg(int b) {
                             ^
    tinycss/speedups.c:512:32: warning: unused function '__Pyx_PyBoolOrNull_FromLong' [-Wunused-function]
    static CYTHON_INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) {
                                   ^
    tinycss/speedups.c:4481:36: warning: unused function '__Pyx_PyInt_AsUnsignedChar' [-Wunused-function]
    static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
                                       ^
    tinycss/speedups.c:4500:37: warning: unused function '__Pyx_PyInt_AsUnsignedShort' [-Wunused-function]
    static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
                                        ^
    tinycss/speedups.c:4519:35: warning: unused function '__Pyx_PyInt_AsUnsignedInt' [-Wunused-function]
    static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
                                      ^
    tinycss/speedups.c:4538:27: warning: unused function '__Pyx_PyInt_AsChar' [-Wunused-function]
    static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
                              ^
    tinycss/speedups.c:4557:28: warning: unused function '__Pyx_PyInt_AsShort' [-Wunused-function]
    static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
                               ^
    tinycss/speedups.c:4595:34: warning: unused function '__Pyx_PyInt_AsSignedChar' [-Wunused-function]
    static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
                                     ^
    tinycss/speedups.c:4614:35: warning: unused function '__Pyx_PyInt_AsSignedShort' [-Wunused-function]
    static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
                                      ^
    tinycss/speedups.c:4633:33: warning: unused function '__Pyx_PyInt_AsSignedInt' [-Wunused-function]
    static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
                                    ^
    tinycss/speedups.c:4652:26: warning: unused function '__Pyx_PyInt_AsLongDouble' [-Wunused-function]
    static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
                             ^
    tinycss/speedups.c:4776:35: warning: function '__Pyx_PyInt_AsLongLong' is not needed and will not be emitted [-Wunneeded-internal-declaration]
    static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
                                      ^
    tinycss/speedups.c:4846:42: warning: function '__Pyx_PyInt_AsSignedLongLong' is not needed and will not be emitted [-Wunneeded-internal-declaration]
    static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
                                             ^
    tinycss/speedups.c:4896:27: warning: unused function '__Pyx_ErrFetch' [-Wunused-function]
    static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
                              ^
    19 warnings generated.
    tinycss/speedups.c:705:14: warning: explicitly assigning value of variable of type 'PyObject *' (aka 'struct _object *') to itself [-Wself-assign]
      __pyx_self = __pyx_self;
      ~~~~~~~~~~ ^ ~~~~~~~~~~
    tinycss/speedups.c:1571:14: warning: explicitly assigning value of variable of type 'PyObject *' (aka 'struct _object *') to itself [-Wself-assign]
      __pyx_self = __pyx_self;
      ~~~~~~~~~~ ^ ~~~~~~~~~~
    tinycss/speedups.c:5348:33: warning: unused function '__Pyx_PyInt_FromSize_t' [-Wunused-function]
    static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
                                    ^
    tinycss/speedups.c:5362:29: warning: unused function '__Pyx_PyInt_AsSize_t' [-Wunused-function]
    static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
                                ^
    tinycss/speedups.c:469:32: warning: unused function '__Pyx_GetItemInt_Tuple_Fast' [-Wunused-function]
    static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
                                   ^
    tinycss/speedups.c:509:26: warning: unused function '__Pyx_NegateNonNeg' [-Wunused-function]
    static CYTHON_INLINE int __Pyx_NegateNonNeg(int b) {
                             ^
    tinycss/speedups.c:512:32: warning: unused function '__Pyx_PyBoolOrNull_FromLong' [-Wunused-function]
    static CYTHON_INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) {
                                   ^
    tinycss/speedups.c:4481:36: warning: unused function '__Pyx_PyInt_AsUnsignedChar' [-Wunused-function]
    static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
                                       ^
    tinycss/speedups.c:4500:37: warning: unused function '__Pyx_PyInt_AsUnsignedShort' [-Wunused-function]
    static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
                                        ^
    tinycss/speedups.c:4519:35: warning: unused function '__Pyx_PyInt_AsUnsignedInt' [-Wunused-function]
    static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
                                      ^
    tinycss/speedups.c:4538:27: warning: unused function '__Pyx_PyInt_AsChar' [-Wunused-function]
    static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
                              ^
    tinycss/speedups.c:4557:28: warning: unused function '__Pyx_PyInt_AsShort' [-Wunused-function]
    static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
                               ^
    tinycss/speedups.c:4595:34: warning: unused function '__Pyx_PyInt_AsSignedChar' [-Wunused-function]
    static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
                                     ^
    tinycss/speedups.c:4614:35: warning: unused function '__Pyx_PyInt_AsSignedShort' [-Wunused-function]
    static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
                                      ^
    tinycss/speedups.c:4633:33: warning: unused function '__Pyx_PyInt_AsSignedInt' [-Wunused-function]
    static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
                                    ^
    tinycss/speedups.c:4652:26: warning: unused function '__Pyx_PyInt_AsLongDouble' [-Wunused-function]
    static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
                             ^
    tinycss/speedups.c:4776:35: warning: function '__Pyx_PyInt_AsLongLong' is not needed and will not be emitted [-Wunneeded-internal-declaration]
    static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
                                      ^
    tinycss/speedups.c:4846:42: warning: function '__Pyx_PyInt_AsSignedLongLong' is not needed and will not be emitted [-Wunneeded-internal-declaration]
    static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
                                             ^
    tinycss/speedups.c:4896:27: warning: unused function '__Pyx_ErrFetch' [-Wunused-function]
    static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
                              ^
    19 warnings generated.
    cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. build/temp.macosx-10.10-intel-2.7/tinycss/speedups.o -o build/lib.macosx-10.10-intel-2.7/tinycss/speedups.so

    no previously-included directories found matching 'docs/_build'
Successfully installed icon-font-to-png tinycss requests pillow six
Cleaning up...

I've been able to successfully install and run icon-font-to-png on a linux machine however and it appears the issue might be related to the install of pillow. I'm not too familiar with pip and I might be posting this in the wrong repository, if so, please let me know!

@pawelad
Copy link
Contributor

pawelad commented Mar 15, 2016

From the traceback it seems that the problem is with my abstract class code. I'll try to look into it, but I don't really have a Mac to play with ; - )

From the look of pip install it seems that everything was installed, but could you run pip freeze and paste the results here?

@tomzx
Copy link
Author

tomzx commented Mar 15, 2016

As requested, the result of pip freeze:

Pillow==3.1.1
Twisted==13.2.0
altgraph==0.10.2
bdist-mpkg==0.5.0
bonjour-py==0.3
icon-font-to-png==0.3.2
macholib==1.5.1
matplotlib==1.3.1
modulegraph==0.10.4
numpy==1.8.0rc1
py2app==0.7.3
pyOpenSSL==0.13.1
pyobjc-core==2.5.1
pyobjc-framework-Accounts==2.5.1
pyobjc-framework-AddressBook==2.5.1
pyobjc-framework-AppleScriptKit==2.5.1
pyobjc-framework-AppleScriptObjC==2.5.1
pyobjc-framework-Automator==2.5.1
pyobjc-framework-CFNetwork==2.5.1
pyobjc-framework-Cocoa==2.5.1
pyobjc-framework-Collaboration==2.5.1
pyobjc-framework-CoreData==2.5.1
pyobjc-framework-CoreLocation==2.5.1
pyobjc-framework-CoreText==2.5.1
pyobjc-framework-DictionaryServices==2.5.1
pyobjc-framework-EventKit==2.5.1
pyobjc-framework-ExceptionHandling==2.5.1
pyobjc-framework-FSEvents==2.5.1
pyobjc-framework-InputMethodKit==2.5.1
pyobjc-framework-InstallerPlugins==2.5.1
pyobjc-framework-InstantMessage==2.5.1
pyobjc-framework-LatentSemanticMapping==2.5.1
pyobjc-framework-LaunchServices==2.5.1
pyobjc-framework-Message==2.5.1
pyobjc-framework-OpenDirectory==2.5.1
pyobjc-framework-PreferencePanes==2.5.1
pyobjc-framework-PubSub==2.5.1
pyobjc-framework-QTKit==2.5.1
pyobjc-framework-Quartz==2.5.1
pyobjc-framework-ScreenSaver==2.5.1
pyobjc-framework-ScriptingBridge==2.5.1
pyobjc-framework-SearchKit==2.5.1
pyobjc-framework-ServiceManagement==2.5.1
pyobjc-framework-Social==2.5.1
pyobjc-framework-SyncServices==2.5.1
pyobjc-framework-SystemConfiguration==2.5.1
pyobjc-framework-WebKit==2.5.1
pyparsing==2.0.1
python-dateutil==1.5
pytz==2013.7
requests==2.9.1
scipy==0.13.0b1
six==1.10.0
tinycss==0.3
vboxapi==1.0
wsgiref==0.1.2
xattr==0.6.4
zope.interface==4.1.1

@pawelad pawelad self-assigned this Mar 15, 2016
@pawelad pawelad added the bug label Mar 15, 2016
@pawelad pawelad modified the milestones: 0.3.3, v0.3.3 Mar 15, 2016
@pawelad
Copy link
Contributor

pawelad commented Mar 15, 2016

I tried to add OS X to Travis CI, but unfortunately with no luck (travis-ci/travis-ci#2312).

I tinkered around with the metaclass code - could you uninstall the package, then install it again via pip install git+https://github.com/Pythonity/icon-font-to-png.git command and see if anything changes? Thanks.

@tomzx
Copy link
Author

tomzx commented Mar 15, 2016

@pawelad After investigating a bit, it appears that when pip tries to install the six dependency, it cannot uninstall the one that comes with OSX since it is protected from being removed. (see related issue that pointing me in the right direction: pypa/pip#3165)

Using either --ignore-installed six or --user when running pip install icon-font-to-png under OSX makes icon-font-to-png work properly.

I'm closing this since it's not related to icon-font-to-png.

Thanks for the awesome tool by the way!

@tomzx tomzx closed this as completed Mar 15, 2016
@pawelad
Copy link
Contributor

pawelad commented Mar 16, 2016

So the version from PyPI works with those arguments, and does not without?
Hm, that's very weird - Successfully installed icon-font-to-png tinycss requests pillow six seems to let us know that everything went OK...

Anyway, I'm glad it's working : - )

@pawelad pawelad removed their assignment Mar 16, 2016
@pawelad pawelad removed this from the v0.3.3 milestone Mar 16, 2016
pawelad added a commit that referenced this issue Mar 16, 2016
@pawelad pawelad self-assigned this Mar 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants