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

Error setting mixed type Cmd environment #56780

Open
KSepetanc opened this issue Dec 8, 2024 · 0 comments
Open

Error setting mixed type Cmd environment #56780

KSepetanc opened this issue Dec 8, 2024 · 0 comments

Comments

@KSepetanc
Copy link

Opening an issue as suggested on discourse.

The following command results in error because it has mixed strings and integers.

Cmd(ampl PF.run,env=("param1"=>1,"param2"=>"abc"))

ERROR: MethodError: no method matching byteenv(::Tuple{Pair{String, Int64}, Pair{String, String}})

Closest candidates are:
  byteenv(::Nothing)
   @ Base cmd.jl:249
  byteenv(::Union{AbstractArray{Pair{T, V}, 1}, Tuple{Vararg{Pair{T, V}}}}) where {T<:AbstractString, V}
   @ Base cmd.jl:250
  byteenv(::AbstractDict)
   @ Base cmd.jl:247
  ...

Stacktrace:
 [1] Cmd(cmd::Cmd; ignorestatus::Bool, env::Tuple{…}, dir::String, cpus::Nothing, detach::Bool, windows_verbatim::Bool, windows_hide::Bool)
   @ Base .\cmd.jl:30
 [2] top-level scope
   @ REPL[20]:1
Some type information was truncated. Use `show(err)` to see complete types.

If the parameters are exclusively integers or exclusively strings then it appears to work ok. I am running Julia 1.10.7.

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

1 participant