Closed adrianodemarino closed 1 year ago
Hi!
If xlsxwriter
brakes the compilation on apple silicon try updating the package with cargo update -p xlsxwriter
. If that works feel free to open a PR that updates the dependency!
I tried using the latest version of xlsxwriter (v0.6.0), but I encountered a different error.
error[E0599]: no method named `add_worksheet` found for enum `std::result::Result` in the current scope
--> src/csv/report.rs:131:24
|
131 | let mut sheet = wb.add_worksheet(Some("Report"))?;
| ^^^^^^^^^^^^^ method not found in `Result<Workbook, XlsxError>`
|
note: the method `add_worksheet` exists on the type `xlsxwriter::Workbook`
--> /Users/adrianodemarino/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xlsxwriter-0.6.0/src/workbook.rs:157:5
|
157 | / pub fn add_worksheet<'a>(
158 | | &'a self,
159 | | sheet_name: Option<&str>,
160 | | ) -> Result<Worksheet<'a>, XlsxError> {
| |_________________________________________^
help: use the `?` operator to extract the `xlsxwriter::Workbook` value, propagating a `Result::Err` value to the caller
|
131 | let mut sheet = wb?.add_worksheet(Some("Report"))?;
| +
error[E0599]: no method named `close` found for enum `std::result::Result` in the current scope
--> src/csv/report.rs:147:8
|
147 | wb.close()?;
| ^^^^^ method not found in `Result<Workbook, XlsxError>`
|
note: the method `close` exists on the type `xlsxwriter::Workbook`
--> /Users/adrianodemarino/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xlsxwriter-0.6.0/src/workbook.rs:277:5
|
277 | pub fn close(mut self) -> Result<(), XlsxError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: use the `?` operator to extract the `xlsxwriter::Workbook` value, propagating a `Result::Err` value to the caller
|
147 | wb?.close()?;
| +
For more information about this error, try `rustc --explain E0599`.
error: could not compile `rust-bio-tools` (bin "rbt") due to 2 previous errors
error: failed to compile `rust-bio-tools v0.42.0 (/Users/adrianodemarino/Downloads/rust_pro/rust-bio-tools-0.42.0)`, intermediate artifacts can be found at `/Users/adrianodemarino/Downloads/rust_pro/rust-bio-tools-0.42.0/target`
Ah i see! So there must have been some changes in the API since v0.3.5
. I'll quickly have a look into that. I assume you're planning to use rbt
for something other than it's rbt csv-report
function right?
Thank you very much for your time. Indeed, I wanted to try it because I'm new to Rust and wanted to experiment a bit with this repository
Great! Just in case you wanted to try the rbt csv-report
command (which is causing the error cause it used the xlsx writer package) I would have pointed you to its successor datavzrd.
Should be fixed with https://github.com/rust-bio/rust-bio-tools/pull/257. If you want to try around immediately without waiting for the PR to be merged just checkout the branch with the fix.
thanks a lot, it worked perfectly now :)
Hi, thanks a lot for this amazing repo.
I'm trying to install it via
cargo install --path .
this is the error i get on a Apple M2 Pro macOS Ventura 13.4.1: