Why my package work locally but not with ]add

Hello :smiley:.
I published few month ago my first small package DICOMTree.jl, which dispatches the Tree function of Term.jl for medical DICOM data.
When I run the package locally on my machine (git fork, cd DICOMtree, ]instantiate then Tree(...)), everything works fine.

But when I install the package with ]add DICOMTree and use it (Tree(...)), it returns the following error:

ERROR: MethodError: no method matching print_tree(::typeof(Term.Trees.print_node), ::typeof(Term.Trees.print_key), ::IOBuffer, ::Dict{…}; charset::AbstractTrees.TreeCharSet, printkeys::Bool, prefix::String, with_keys::Bool, maxdepth::Int64)
This error has been manually thrown, explicitly, so the method may exist but be intentionally marked as unimplemented.

Closest candidates are:
  print_tree(::Function, ::Function, ::IO, ::Any; maxdepth, indicate_truncation, charset, printkeys, depth, prefix, printnode_kw) got unsupported keyword argument "with_keys"
   @ AbstractTrees ~/.julia/packages/AbstractTrees/Ftf8W/src/printing.jl:194
  print_tree(::Function, ::IO, ::Any; kw...)
   @ AbstractTrees ~/.julia/packages/AbstractTrees/Ftf8W/src/printing.jl:276
  print_tree(::Any; kw...)
   @ AbstractTrees ~/.julia/packages/AbstractTrees/Ftf8W/src/printing.jl:278
  ...


Also (maybe it’s related), in VSCode I have the Tree functions definition highlighted in blue with the warning "An imported function has been extended without using module defined type arguments.Julia(TypePiracy)". I do not really understand what is the problem.

Thank you in advance for your answers!
fdekerm

I can install your package fine, even though there seam to be no tests.

julia> using DICOMTree

julia> Tree(...)
ERROR: ParseError:
# Error @ REPL[4]:1:6
Tree(...)
#    β””β”€β”˜ ── invalid identifier
Stacktrace:
 [1] top-level scope
   @ none:1

Can you share a complete example with the commands that work locally but fails otherwise? Perhaps also share a dcm file, if that is needed?

1 Like