Coder Social home page Coder Social logo

Error when executing tm.py about pytm HOT 11 CLOSED

izar avatar izar commented on August 24, 2024
Error when executing tm.py

from pytm.

Comments (11)

anshumanbh avatar anshumanbh commented on August 24, 2024 2

@sushi2k @shambho This fixed it for me:
parrt/dtreeviz#33 (comment)

from pytm.

shambho avatar shambho commented on August 24, 2024

@sushi2k This looks like an error in graphviz package Sven. Can you try reinstalling graphviz with the following command and let me know if it works?

brew install graphviz --with-pango

Reference: y13i/sgviz#10

from pytm.

sushi2k avatar sushi2k commented on August 24, 2024

Thanks. But when executing this I only got an error (same happens with "install", I also removed it and tried to reinstall again, I executed brew update and also brew cleanup)

$ brew reinstall graphviz --with-pango
Usage: brew reinstall [options] formula

Uninstall and then install formula (with existing and any appended install
options).

Unless HOMEBREW_NO_INSTALL_CLEANUP is set, brew cleanup will be run for the
reinstalled formulae or, every 30 days, for all formulae.

    -d, --debug                      If brewing fails, open an interactive
                                     debugging session with access to IRB or a
                                     shell inside the temporary build directory
    -s, --build-from-source          Compile formula from source even if a
                                     bottle is available.
        --force-bottle               Install from a bottle if it exists for the
                                     current or newest version of macOS, even if
                                     it would not normally be used for
                                     installation.
        --keep-tmp                   Don't delete the temporary files created
                                     during installation.
    -f, --force                      Install without checking for previously
                                     installed keg-only or non-migrated
                                     versions.
    -v, --verbose                    Print the verification and postinstall
                                     steps.
        --display-times              Print install times for each formula at the
                                     end of the run.
    -h, --help                       Show this message.
Error: invalid option: --with-pango

I was installing now pango and librsvg also via brew but no change.

$ brew install pango librsvg

Seems --with-pango is no longer supported in the formula of graphviz. BurntSushi/erd#48

Any idea how to get it work?

from pytm.

shambho avatar shambho commented on August 24, 2024

hmm, I don't have a Mac to test what you're seeing unfortunately. @izar how did you install Graphviz on your machine?

from pytm.

izar avatar izar commented on August 24, 2024

Are you using Quartz?

I am running on 10.14.4 too, no Quartz.

graphviz: stable 2.40.1 (bottled), HEAD
Graph visualization software from AT&T and Bell Labs
https://www.graphviz.org/
/usr/local/Cellar/graphviz/HEAD-3cd810d (532 files, 12.2MB) *
Built from source on 2019-01-11 at 13:31:46 with: --with-app --with-gts --with-pango
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/graphviz.rb
==> Dependencies
Build: pkg-config ✔
Required: gd ✔, gts ✔, libpng ✔, libtool ✔
==> Options
--HEAD
Install HEAD version

from pytm.

sushi2k avatar sushi2k commented on August 24, 2024

So I had Xquartz installed and removed it as described here: https://gist.github.com/pwnsdx/d127873e24cef159d4d603accaf37ee4

I reinstalled now graphviz via brew but still same error. I can also not install it with the flags as mentioned by you, as I just get an error as they are not part of the formula anymore (see also BurntSushi/erd#48)

➜  pytm git:(master) ✗ brew reinstall graphviz --with-app --with-gts --with-pango
Usage: brew reinstall [options] formula

Uninstall and then install formula (with existing and any appended install
options).

Unless HOMEBREW_NO_INSTALL_CLEANUP is set, brew cleanup will be run for the
reinstalled formulae or, every 30 days, for all formulae.

    -d, --debug                      If brewing fails, open an interactive
                                     debugging session with access to IRB or a
                                     shell inside the temporary build directory
    -s, --build-from-source          Compile formula from source even if a
                                     bottle is available.
        --force-bottle               Install from a bottle if it exists for the
                                     current or newest version of macOS, even if
                                     it would not normally be used for
                                     installation.
        --keep-tmp                   Don't delete the temporary files created
                                     during installation.
    -f, --force                      Install without checking for previously
                                     installed keg-only or non-migrated
                                     versions.
    -v, --verbose                    Print the verification and postinstall
                                     steps.
        --display-times              Print install times for each formula at the
                                     end of the run.
    -h, --help                       Show this message.
Error: invalid option: --with-app

from pytm.

izar avatar izar commented on August 24, 2024

I'm sorry, but that's the extent of my knowledge regarding graphviz installation on a Mac. Did you try installing with no flags, just play brew install graphviz ?

from pytm.

sushi2k avatar sushi2k commented on August 24, 2024

yes, that's the only way how I can install it, but then I am getting this error

➜  pytm git:(master) ✗ ./tm.py --dfd | dot -Tpng -o sample1.png
2019-04-03 07:22:18.988 dot[8301:55469] +[__NSCFConstantString length]: unrecognized selector sent to class 0x7fff837a48c0
2019-04-03 07:22:18.988 dot[8301:55469] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[__NSCFConstantString length]: unrecognized selector sent to class 0x7fff837a48c0'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff2bb7143d __exceptionPreprocess + 256
	1   libobjc.A.dylib                     0x00007fff57a83720 objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff2bbee1a5 __CFExceptionProem + 0
	3   CoreFoundation                      0x00007fff2bb10ad0 ___forwarding___ + 1486
	4   CoreFoundation                      0x00007fff2bb10478 _CF_forwarding_prep_0 + 120
	5   CoreFoundation                      0x00007fff2baa1f54 CFStringCompareWithOptionsAndLocale + 72
	6   ImageIO                             0x00007fff2e60f367 _ZN17IIO_ReaderHandler15readerForUTTypeEPK10__CFString + 53
	7   ImageIO                             0x00007fff2e5e7527 _ZN14IIOImageSource14extractOptionsEP13IIODictionary + 183
	8   ImageIO                             0x00007fff2e6142e6 _ZN14IIOImageSourceC2EP14CGDataProviderP13IIODictionary + 72
	9   ImageIO                             0x00007fff2e6141bb CGImageSourceCreateWithDataProvider + 172
	10  libgvplugin_quartz.6.dylib          0x000000010accec54 quartz_loadimage_quartz + 224
	11  libgvc.6.dylib                      0x000000010ac0c781 gvloadimage + 269
	12  libgvc.6.dylib                      0x000000010ac0b7e0 gvrender_usershape + 955
	13  libgvc.6.dylib                      0x000000010ac3962e poly_gencode + 2129
	14  libgvc.6.dylib                      0x000000010ac45b7b emit_node + 1030
	15  libgvc.6.dylib                      0x000000010ac44805 emit_graph + 4769
	16  libgvc.6.dylib                      0x000000010ac49d0d gvRenderJobs + 4911
	17  dot                                 0x000000010ac04d62 main + 697
	18  libdyld.dylib                       0x00007fff58b51085 start + 1
	19  ???                                 0x0000000000000004 0x0 + 4
)
libc++abi.dylib: terminating with uncaught exception of type NSException
[1]    8300 done       ./tm.py --dfd |
       8301 abort      dot -Tpng -o sample1.png

from pytm.

izar avatar izar commented on August 24, 2024

Yep - sorry, but it appears to be a graphviz problem. Not sure what to tell you here.

from pytm.

sushi2k avatar sushi2k commented on August 24, 2024

Thanks for your help. Once i figure it out, I will share it here

from pytm.

sushi2k avatar sushi2k commented on August 24, 2024

Awesome. Thanks @anshumanbh that worked :-)

from pytm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.