labauto / SLab.jl

The official implementation of the scheduling method for the S-LAB (scheduling for laboratory automation in biology) problem (Itoh and Horinouchi et al. SLAS Tech., 2021)
MIT License
4 stars 3 forks source link

MethodError: no method matching SLab.Operation(::Int64, ::Int64, ::Int64, ::Int64, ::InlineStrings.String1), possibly due to unmaintained dependency. #1

Closed NatNat666 closed 8 months ago

NatNat666 commented 8 months ago

Hello,

I've tried to run the provided examples and keep running into MethodError: no method matching SLab.Operation(::Int64, ::Int64, ::Int64, ::Int64, ::InlineStrings.String1)

I'm new to Julia and its a fresh install on windows according to the "How to run" section of the readme.

Pasted below is the sumary of the package installation and directly thereafter trying to run the examle.

Help would be greatly appreciated.

Precompiling project... 185 dependencies successfully precompiled in 84 seconds. 8 already precompiled. 1 dependency had output during precompilation: ┌ Formatting │ ┌ Warning: DEPRECATION NOTICE │ │ │ │ Formatting.jl has been unmaintained for a while, with some serious │ │ correctness bugs compromising the original purpose of the package. As a result, │ │ it has been deprecated - consider using an alternative, such as │ │ Format.jl (https://github.com/JuliaString/Format.jl) or the Printf stdlib directly. │ │ │ │ If you are not using Formatting.jl as a direct dependency, please consider │ │ opening an issue on any packages you are using that do use it as a dependency. │ │ From Julia 1.9 onwards, you can query ]why Formatting to figure out which │ │ package originally brings it in as a dependency. │ └ @ Formatting C:\Users\Lennard.julia\packages\Formatting\3VxOt\src\Formatting.jl:12 └

julia> exit() (base) PS F:\SLab.jl-main> julia --project=. bin/run.jl examples/case_1/case_1_A ERROR: LoadError: MethodError: no method matching SLab.Operation(::Int64, ::Int64, ::Int64, ::Int64, ::InlineStrings.String1)

Closest candidates are: SLab.Operation(::Int64, ::Int64, ::Int64, ::Int64, ::String) @ SLab F:\SLab.jl-main\src\types.jl:47

Stacktrace: [1] load_case(case_path::String) @ SLab F:\SLab.jl-main\src\load.jl:24 [2] main(case_name::String, case_path::String) @ SLab F:\SLab.jl-main\src\SLab.jl:18 [3] top-level scope @ F:\SLab.jl-main\bin\run.jl:15 in expression starting at F:\SLab.jl-main\bin\run.jl:15 (base) PS F:\SLab.jl-main>

yuifu commented 8 months ago

@NatNat666 Thank you for bringing the error to our attention!

We've identified that the issue stems from the stringtype option in CSV.read(). It seems that after we made this repository public, stringtype=InlineString became the default (https://csv.juliadata.org/stable/reading.html#stringtype), which likely caused the type error.

To resolve this error, we've updated the code to specify stringtype=String in CSV.read() (https://github.com/labauto/SLab.jl/commit/f836b0bee406aa7cbbf18f2ce282ebf8de77ea63).

Could you please delete your local repository and start over from "1. Get the source code."? We appreciate your cooperation and patience!

Additionally, our team has published a paper on an accelerated scheduling algorithm. Feel free to check it out for reference:

NatNat666 commented 8 months ago

Thank you @yuifu for the quick reply and fix.

I tried again and the examples now work. I also thank you for bringing your new paper to my attention, I'll have a look at that too.