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

Extension for Text/HTML #3

Open
dlfivefifty opened this issue Sep 17, 2015 · 11 comments
Open

Extension for Text/HTML #3

dlfivefifty opened this issue Sep 17, 2015 · 11 comments

Comments

@dlfivefifty
Copy link

I get the error

LoadError: MethodError: extension has no method matching extension(::MIME{symbol("text/html")})
while loading In[3], in expression starting on line 1

in push! at /Users/solver/.julia/v0.4/Reel/src/Reel.jl:40
in roll at /Users/solver/.julia/v0.4/Reel/src/Reel.jl:93

@shashi
Copy link
Owner

shashi commented Sep 17, 2015

Looks like what you need is Cairo.jl. Installing that should magically fix things.

I know it's not the most ideal error message for this thing. Will fix this.

@dlfivefifty
Copy link
Author

No, I have Cairo and it doesn’t help…

On 17 Sep 2015, at 9:07 pm, Shashi Gowda notifications@github.com wrote:

Looks like what you need is Cairo.jl. Installing that should magically fix things.

I know it's not the most ideal error message for this thing. Will fix this.


Reply to this email directly or view it on GitHub #3 (comment).

@shashi
Copy link
Owner

shashi commented Sep 17, 2015

okay what i said is only correct in context of compose/gadfly.

The thing you are trying to render needs to have writemime type defined for either PNG / JPEG mime types.

@dlfivefifty
Copy link
Author

I got the error running

film = roll(fps=30, duration=2) do t, dt
plot([x -> sin(x+t_π), x -> cos(x+t_π)], 0, 6)
end

in the latest Jupyter. Here’s my versioninfo():

Julia Version 0.4.0-rc1
Commit e5c6964 (2015-09-09 16:07 UTC)
Platform Info:
System: Darwin (x86_64-apple-darwin13.4.0)
CPU: Intel(R) Core(TM) i7-3820QM CPU @ 2.70GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
LAPACK: libopenblas
LIBM: libopenlibm
LLVM: libLLVM-3.3

On 17 Sep 2015, at 9:16 pm, Shashi Gowda notifications@github.com wrote:

okay what i said is only correct in context of compose/gadfly.

The thing you are trying to render needs to have writemime type defined for either PNG / JPEG mime types.


Reply to this email directly or view it on GitHub #3 (comment).

@dlfivefifty
Copy link
Author

Jupyter isn’t relevant, I get the same message on the command line:

julia> using Cairo,Gadfly,Reel

julia> film = roll(fps=30, duration=2) do t, dt
plot([x -> sin(x+t_π), x -> cos(x+t_π)], 0, 6)
end
ERROR: MethodError: extension has no method matching extension(::MIME{symbol("text/html")})
in push! at /Users/solver/.julia/v0.4/Reel/src/Reel.jl:40
in roll at /Users/solver/.julia/v0.4/Reel/src/Reel.jl:93

On 17 Sep 2015, at 9:18 pm, Sheehan Olver solver@mac.com wrote:

I got the error running

film = roll(fps=30, duration=2) do t, dt
plot([x -> sin(x+t_π), x -> cos(x+t_π)], 0, 6)
end

in the latest Jupyter. Here’s my versioninfo():

Julia Version 0.4.0-rc1
Commit e5c6964 (2015-09-09 16:07 UTC)
Platform Info:
System: Darwin (x86_64-apple-darwin13.4.0)
CPU: Intel(R) Core(TM) i7-3820QM CPU @ 2.70GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
LAPACK: libopenblas
LIBM: libopenlibm
LLVM: libLLVM-3.3

On 17 Sep 2015, at 9:16 pm, Shashi Gowda <notifications@github.com mailto:notifications@github.com> wrote:

okay what i said is only correct in context of compose/gadfly.

The thing you are trying to render needs to have writemime type defined for either PNG / JPEG mime types.


Reply to this email directly or view it on GitHub #3 (comment).

@shashi
Copy link
Owner

shashi commented Jun 9, 2016

@dlfivefifty just tried it in 0.4, it works...

@tawheeler
Copy link
Collaborator

Stale and looks like it is solved. Will close in a few days if noone objects.

@RuohanZhan
Copy link

I have the same problem here, the version info is:
Julia Version 1.0.1
Commit 0d713926f8 (2018-09-29 19:05 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin14.5.0)
CPU: Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, broadwell)

@irving-school-of-ai
Copy link

irving-school-of-ai commented Nov 22, 2018

I'm using Julia-1.0.2
It's not solved. I have the same issue:
julia> film = roll(fps=30, duration=2) do t, dt
plot([x -> sin(x+tpi), x -> cos(x+tpi)], 0, 6)
end
ERROR: MethodError: no method matching extension(::MIME{Symbol("text/html")})
Closest candidates are:
extension(::String) at C:\Users\BB.julia\packages\Reel\sXEr9\src\Reel.jl:28
extension(::MIME{Symbol("image/jpeg")}) at C:\Users\BB.julia\packages\Reel\sXEr9\src\Reel.jl:27
extension(::MIME{Symbol("image/png")}) at C:\Users\BB.julia\packages\Reel\sXEr9\src\Reel.jl:26
Stacktrace:
[1] push!(::Frames{MIME{Symbol("text/html")}}, ::Plot) at C:\Users\BB.julia\packages\Reel\sXEr9\src\Reel.jl:39
[2] #roll#9(::Int64, ::Int64, ::Function, ::getfield(Main, Symbol("##21#24"))) at C:\Users\BB.julia\packages\Reel\sXEr9\src\Reel.jl:100
[3] (::getfield(Reel, Symbol("#kw##roll")))(::NamedTuple{(:fps, :duration),Tuple{Int64,Int64}}, ::typeof(roll), ::Function) at .\none:0
[4] top-level scope at none:0

This package looks pretty cool. I have imagick and ffmpeg installed. Will google some more

@tawheeler
Copy link
Collaborator

Will have to look into this.
An extension function needs to be implemented for text/html. May be as simple as declaring:

extension(::MIME"text/html") = ".html"

You can try inserting that around line 26 of the package source file. If not I can take a stab at it soonish.

@tawheeler tawheeler changed the title Doesn't work in 0.4 Extension for Text/HTML Dec 3, 2018
@tawheeler tawheeler reopened this Dec 3, 2018
@MaximeBouton
Copy link
Collaborator

@irving-school-of-ai could you confirm that it fixed the problem before we close the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants