JuliaPy / JuliaPy/PyCall.jl

Docs integration should not throw errors

Abierto
#627 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Julia
Estrellas
1.5k
Forks
186
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

```
julia> using PyCall, PyPlot

julia> x= 1:10
1:10

julia> y= 1:10
1:10

julia> fig, ax = subplots()
(Figure(PyObject ), PyObject )

julia> ax[:plot](x,y)
1-element Array{PyObject,1}:
PyObject

help?> ax
search: ax axis axes axvspan axvline axhspan axhline Axes3D max maximum maximum! maxintfloat delaxes minmax typemax findmax

ERROR: PyError ($(Expr(:escape, :(ccall(#= /home/pfitzseb/.julia/packages/PyCall/0jMpb/src/conversions.jl:87 =# @pysym(PyString_AsStringAndSize), Cint, (PyPtr, Ptr{Ptr{UInt8}}, Ptr{Int}), po, _ps_ptr, _ps_len)))))
TypeError('expected bytes, NoneType found')

Stacktrace:
[1] pyerr_check at /home/pfitzseb/.julia/packages/PyCall/0jMpb/src/exception.jl:60 [inlined]
[2] pyerr_check at /home/pfitzseb/.julia/packages/PyCall/0jMpb/src/exception.jl:64 [inlined]
[3] macro expansion at /home/pfitzseb/.julia/packages/PyCall/0jMpb/src/exception.jl:84 [inlined]
[4] convert(::Type{String}, ::PyObject) at /home/pfitzseb/.julia/packages/PyCall/0jMpb/src/conversions.jl:87
[5] getdoc at /home/pfitzseb/.julia/packages/PyCall/0jMpb/src/PyCall.jl:857 [inlined]
[6] getdoc(::Any, ::Any) at ./docs/Docs.jl:254
[7] doc(::Base.Docs.Binding, ::Type) at /home/pfitzseb/Documents/Git/julia/usr/share/julia/stdlib/v1.2/REPL/src/docview.jl:86
[8] doc(::Base.Docs.Binding) at /home/pfitzseb/Documents/Git/julia/usr/share/julia/stdlib/v1.2/REPL/src/docview.jl:85
[9] top-level scope at /home/pfitzseb/Documents/Git/julia/usr/share/julia/stdlib/v1.2/REPL/src/docview.jl:285
```

Originally reported in https://github.com/JunoLab/Juno.jl/issues/217. Seems to happen for all Julia versions between 0.7 and master, afaict.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Reproduce the PyCall and PyPlot REPL session, then inspect PyCall/src/conversions.jl:87, PyCall.jl:857, Julia's Docs.jl:254, and REPL/docview.jl:86. The work is done when requesting help for the plotted object no longer throws the reported TypeError.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
julia, matplotlib, python
Área
documentation
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.