SciNim / getting-started

Getting started with Nim for Scientific Computing
https://scinim.github.io/getting-started/
Creative Commons Zero v1.0 Universal
61 stars 6 forks source link

use nimibook version that does not contain async build #50

Closed pietroppeter closed 1 year ago

pietroppeter commented 2 years ago

to troubleshoot #49

pietroppeter commented 2 years ago

indeed useful (below the detailed log), from which some info:

nbCodeInBlock:
  let df = toDf({"A" : [1, 8, 0], "B" : [3, 4, 0], "C" : [5, 7, 2]})
  echo df.gather(df.getKeys(), ## get all keys to gather   # <- error here!
                 key = "Class", ## the name of the `key` column
                 value = "Num")

specific error:

/home/runner/work/getting-started/getting-started/book/basics/data_wrangling.nim(418, 10) template/generic instantiation of `gather` from here
/home/runner/.nimble/pkgs/datamancer-0.3.4/datamancer/dataframe.nim(2154, 41) template/generic instantiation of `difference` from here
/home/runner/.choosenim/toolchains/nim-1.6.8/lib/pure/collections/sets.nim(455, 15) Error: type mismatch: got <HashSet[system.string]>
but expected one of:
iterator items(a: cstring): char
...
the detailed error log for `basics/data_wrangling.nim`:

[nimibook] build entry: basics/data_wrangling.nim
[Executing] nim r book/basics/data_wrangling.nim
Hint: used config file '/home/runner/.choosenim/toolchains/nim-1.6.8/config/nim.cfg' [Conf]
Hint: used config file '/home/runner/.choosenim/toolchains/nim-1.6.8/config/config.nims' [Conf]
..........................................................................................................................................................................................................
/home/runner/.nimble/pkgs/nimblas-0.2.2/nimblas/private/common.nim(50, 7) Hint: Using BLAS library with name: libblas.so(||.3|.2|.1|.0) [User]
.....................................................................................................
/home/runner/work/getting-started/getting-started/book/basics/data_wrangling.nim(29, 10) Hint: duplicate import of 'datamancer'; previous import here: /home/runner/work/getting-started/getting-started/book/basics/data_wrangling.nim(6, 8) [DuplicateModuleImport]
......................................................
/home/runner/.nimble/pkgs/nimlapack-0.2.1/nimlapack.nim(18, 7) Hint: Using LAPACK library with name: liblapack.so(||.3|.2|.1|.0) [User]
..................................
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(317, 11) Hint: 'chunk_offset' should be: 'chunkOffset' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(318, 9) Hint: 'chunk_size' should be: 'chunkSize' [Name]
/home/runner/work/getting-started/getting-started/book/basics/data_wrangling.nim(114, 9) Hint: 't5' is declared but not used [XDeclaredButNotUsed]
/home/runner/work/getting-started/getting-started/book/basics/data_wrangling.nim(109, 7) Hint: 't1' is declared but not used [XDeclaredButNotUsed]
/home/runner/work/getting-started/getting-started/book/basics/data_wrangling.nim(110, 7) Hint: 't2' is declared but not used [XDeclaredButNotUsed]
/home/runner/work/getting-started/getting-started/book/basics/data_wrangling.nim(111, 7) Hint: 't3' is declared but not used [XDeclaredButNotUsed]
/home/runner/work/getting-started/getting-started/book/basics/data_wrangling.nim(112, 7) Hint: 't4' is declared but not used [XDeclaredButNotUsed]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/tensor/higher_order_foldreduce.nim(26, 39) Hint: 'block_offset' should be: 'blockOffset' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/tensor/higher_order_foldreduce.nim(26, 53) Hint: 'block_size' should be: 'blockSize' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/tensor/higher_order_foldreduce.nim(26, 39) Hint: 'block_offset' should be: 'blockOffset' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/tensor/higher_order_foldreduce.nim(26, 53) Hint: 'block_size' should be: 'blockSize' [Name]
/home/runner/.nimble/pkgs/datamancer-0.3.4/datamancer/dataframe.nim(1570, 7) Hint: 'C' should be: 'c' [Name]
/home/runner/.nimble/pkgs/datamancer-0.3.4/datamancer/dataframe.nim(1565, 7) Hint: 'C' should be: 'c' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(61, 22) Hint: 'res_alias0_' should be: 'resAlias0' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(61, 22) Hint: 'x_alias1_' should be: 'xAlias1' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(61, 22) Hint: 'y_alias2_' should be: 'yAlias2' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(67, 27) Hint: 'res_raw_data0_' should be: 'resRawData0' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(67, 27) Hint: 'x_raw_data1_' should be: 'xRawData1' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(67, 27) Hint: 'y_raw_data2_' should be: 'yRawData2' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach.nim(165, 20) Hint: 'size_' should be: 'size' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(204, 13) Hint: 'omp_annotation`gensym1140' should be: 'ompAnnotation`gensym1140' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(207, 9) Hint: 'contiguousIndex_' should be: 'contiguousIndex' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(317, 11) Hint: 'chunk_offset_' should be: 'chunkOffset' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(318, 9) Hint: 'chunk_size_' should be: 'chunkSize' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach.nim(81, 19) Hint: 'coord_' should be: 'coord' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(81, 28) Hint: 'iter0_pos_' should be: 'iter0Pos' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(81, 28) Hint: 'iter1_pos_' should be: 'iter1Pos' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(81, 28) Hint: 'iter2_pos_' should be: 'iter2Pos' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(95, 11) Hint: 'accum_size`gensym1127' should be: 'accumSize`gensym1127' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach.nim(82, 15) Hint: 'j_mem_offset_' should be: 'jMemOffset' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach.nim(83, 15) Hint: 'k_next_elem_' should be: 'kNextElem' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(61, 22) Hint: 'res_alias0_' should be: 'resAlias0' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(61, 22) Hint: 'x_alias1_' should be: 'xAlias1' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(67, 27) Hint: 'res_raw_data0_' should be: 'resRawData0' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(67, 27) Hint: 'x_raw_data1_' should be: 'xRawData1' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach.nim(165, 20) Hint: 'size_' should be: 'size' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(204, 13) Hint: 'omp_annotation`gensym1470' should be: 'ompAnnotation`gensym1470' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(207, 9) Hint: 'contiguousIndex_' should be: 'contiguousIndex' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(317, 11) Hint: 'chunk_offset_' should be: 'chunkOffset' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(318, 9) Hint: 'chunk_size_' should be: 'chunkSize' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach.nim(81, 19) Hint: 'coord_' should be: 'coord' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(81, 28) Hint: 'iter0_pos_' should be: 'iter0Pos' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(81, 28) Hint: 'iter1_pos_' should be: 'iter1Pos' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(95, 11) Hint: 'accum_size`gensym1460' should be: 'accumSize`gensym1460' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach.nim(82, 15) Hint: 'j_mem_offset_' should be: 'jMemOffset' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach.nim(83, 15) Hint: 'k_next_elem_' should be: 'kNextElem' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(61, 22) Hint: 'res_alias0_' should be: 'resAlias0' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(61, 22) Hint: 'x_alias1_' should be: 'xAlias1' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(67, 27) Hint: 'res_raw_data0_' should be: 'resRawData0' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(67, 27) Hint: 'x_raw_data1_' should be: 'xRawData1' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach.nim(165, 20) Hint: 'size_' should be: 'size' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(204, 13) Hint: 'omp_annotation`gensym1509' should be: 'ompAnnotation`gensym1509' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(207, 9) Hint: 'contiguousIndex_' should be: 'contiguousIndex' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(317, 11) Hint: 'chunk_offset_' should be: 'chunkOffset' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(318, 9) Hint: 'chunk_size_' should be: 'chunkSize' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach.nim(81, 19) Hint: 'coord_' should be: 'coord' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(81, 28) Hint: 'iter0_pos_' should be: 'iter0Pos' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(81, 28) Hint: 'iter1_pos_' should be: 'iter1Pos' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(95, 11) Hint: 'accum_size`gensym1499' should be: 'accumSize`gensym1499' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach.nim(82, 15) Hint: 'j_mem_offset_' should be: 'jMemOffset' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach.nim(83, 15) Hint: 'k_next_elem_' should be: 'kNextElem' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(61, 22) Hint: 'res_alias0_' should be: 'resAlias0' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(61, 22) Hint: 'x_alias1_' should be: 'xAlias1' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(61, 22) Hint: 'x_alias2_' should be: 'xAlias2' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(67, 27) Hint: 'res_raw_data0_' should be: 'resRawData0' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(67, 27) Hint: 'x_raw_data1_' should be: 'xRawData1' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(67, 27) Hint: 'x_raw_data2_' should be: 'xRawData2' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach.nim(165, 20) Hint: 'size_' should be: 'size' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(204, 13) Hint: 'omp_annotation`gensym1572' should be: 'ompAnnotation`gensym1572' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(207, 9) Hint: 'contiguousIndex_' should be: 'contiguousIndex' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(317, 11) Hint: 'chunk_offset_' should be: 'chunkOffset' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(318, 9) Hint: 'chunk_size_' should be: 'chunkSize' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach.nim(81, 19) Hint: 'coord_' should be: 'coord' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(81, 28) Hint: 'iter0_pos_' should be: 'iter0Pos' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(81, 28) Hint: 'iter1_pos_' should be: 'iter1Pos' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(81, 28) Hint: 'iter2_pos_' should be: 'iter2Pos' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(95, 11) Hint: 'accum_size`gensym1559' should be: 'accumSize`gensym1559' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach.nim(82, 15) Hint: 'j_mem_offset_' should be: 'jMemOffset' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach.nim(83, 15) Hint: 'k_next_elem_' should be: 'kNextElem' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/tensor/higher_order_applymap.nim(45, 23) Hint: 'block_offset' should be: 'blockOffset' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/tensor/higher_order_applymap.nim(45, 37) Hint: 'block_size' should be: 'blockSize' [Name]
/home/runner/.nimble/pkgs/datamancer-0.3.4/datamancer/formula.nim(456, 36) Hint: 'Num' should be: 'num' [Name]
/home/runner/.nimble/pkgs/datamancer-0.3.4/datamancer/formula.nim(456, 36) Hint: 'Num' should be: 'num' [Name]
/home/runner/.nimble/pkgs/datamancer-0.3.4/datamancer/formula.nim(456, 36) Hint: 'Num' should be: 'num' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(61, 22) Hint: 'res_alias0_' should be: 'resAlias0' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(61, 22) Hint: 'Num_alias1_' should be: 'NumAlias1' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(61, 22) Hint: 'Num_alias2_' should be: 'NumAlias2' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(67, 27) Hint: 'res_raw_data0_' should be: 'resRawData0' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(67, 27) Hint: 'Num_raw_data1_' should be: 'NumRawData1' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(67, 27) Hint: 'Num_raw_data2_' should be: 'NumRawData2' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach.nim(165, 20) Hint: 'size_' should be: 'size' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(204, 13) Hint: 'omp_annotation`gensym1876' should be: 'ompAnnotation`gensym1876' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(207, 9) Hint: 'contiguousIndex_' should be: 'contiguousIndex' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(317, 11) Hint: 'chunk_offset_' should be: 'chunkOffset' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/openmp.nim(318, 9) Hint: 'chunk_size_' should be: 'chunkSize' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach.nim(81, 19) Hint: 'coord_' should be: 'coord' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(81, 28) Hint: 'iter0_pos_' should be: 'iter0Pos' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(81, 28) Hint: 'iter1_pos_' should be: 'iter1Pos' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(81, 28) Hint: 'iter2_pos_' should be: 'iter2Pos' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach_common.nim(95, 11) Hint: 'accum_size`gensym1[863](https://github.com/SciNim/getting-started/actions/runs/3136662324/jobs/5093860533#step:6:864)' should be: 'accumSize`gensym1863' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach.nim(82, 15) Hint: 'j_mem_offset_' should be: 'jMemOffset' [Name]
/home/runner/.nimble/pkgs/arraymancer-0.7.15/arraymancer/laser/strided_iteration/foreach.nim(83, 15) Hint: 'k_next_elem_' should be: 'kNextElem' [Name]
/home/runner/work/getting-started/getting-started/book/basics/data_wrangling.nim(416, 1) template/generic instantiation of `nbCodeInBlock` from here
/home/runner/.nimble/pkgs/nimib-#head/nimib.nim(79, 5) template/generic instantiation of `nbCode` from here
/home/runner/.nimble/pkgs/nimib-#head/nimib.nim(74, 18) template/generic instantiation of `captureStdout` from here
/home/runner/work/getting-started/getting-started/book/basics/data_wrangling.nim(418, 10) template/generic instantiation of `gather` from here
/home/runner/.nimble/pkgs/datamancer-0.3.4/datamancer/dataframe.nim(2154, 41) template/generic instantiation of `difference` from here
/home/runner/.choosenim/toolchains/nim-1.6.8/lib/pure/collections/sets.nim(455, 15) Error: type mismatch: got 
but expected one of:
iterator items(a: cstring): char
  first type mismatch at position: 1
  required type for a: cstring
  but expression 's1' is of type: HashSet[system.string]
iterator items(a: string): char
  first type mismatch at position: 1
  required type for a: string
  but expression 's1' is of type: HashSet[system.string]
iterator items(row: Value): Value
  first type mismatch at position: 1
  required type for row: Value
  but expression 's1' is of type: HashSet[system.string]
iterator items[C: ColumnLike](df: DataTable[C]): Value
  first type mismatch at position: 1
  required type for df: DataTable[items.C]
  but expression 's1' is of type: HashSet[system.string]
iterator items[IX, T](a: array[IX, T]): T
  first type mismatch at position: 1
  required type for a: array[IX, T]
  but expression 's1' is of type: HashSet[system.string]
iterator items[T: Ordinal](s: Slice[T]): T
  first type mismatch at position: 1
  required type for s: Slice[items.T]
  but expression 's1' is of type: HashSet[system.string]
iterator items[T: char](a: openArray[T]): T
  first type mismatch at position: 1
  required type for a: openArray[T: char]
  but expression 's1' is of type: HashSet[system.string]
iterator items[T: enum and Ordinal](E: typedesc[T]): T
  first type mismatch at position: 1
  required type for E: typedesc[T: enum and Ordinal]
  but expression 's1' is of type: HashSet[system.string]
iterator items[T: not char](a: openArray[T]): lent2 T
  first type mismatch at position: 1
  required type for a: openArray[T: not char]
  but expression 's1' is of type: HashSet[system.string]
iterator items[T](a: DynamicStackArray[T]): T
  first type mismatch at position: 1
  required type for a: DynamicStackArray[items.T]
  but expression 's1' is of type: HashSet[system.string]
iterator items[T](a: seq[T]): lent2 T
  first type mismatch at position: 1
  required type for a: seq[T]
  but expression 's1' is of type: HashSet[system.string]
iterator items[T](a: set[T]): T
  first type mismatch at position: 1
  required type for a: set[T]
  but expression 's1' is of type: HashSet[system.string]
iterator items[T](t: Tensor[T]): T
  first type mismatch at position: 1
  required type for t: Tensor[items.T]
  but expression 's1' is of type: HashSet[system.string]
iterator items[T](t: Tensor[T]; offset, size: int): T
  first type mismatch at position: 1
  required type for t: Tensor[items.T]
  but expression 's1' is of type: HashSet[system.string]

expression: items(s1)
[nimibook.error] error while processing basics/data_wrangling.nim
pietroppeter commented 2 years ago

a bit weird since in datamancer that exact line is runnableExamples:

  runnableExamples:
    let df = toDf({"A" : [1, 8, 0], "B" : [3, 4, 0], "C" : [5, 7, 2]})
    let dfRes = df.gather(df.getKeys(), ## get all keys to gather
                          key = "Class", ## the name of the `key` column
                          value = "Num")
    doAssert "Class" in dfRes
    doAssert "Num" in dfRes
    doAssert dfRes.ncols == 2
    doAssert dfRes["Class", string] == ["A", "A", "A", "B", "B", "B", "C", "C", "C"].toTensor
    doAssert dfRes["Num", int] == [1, 8, 0, 3, 4, 0, 5, 7, 2].toTensor

  result = C.newDataTable(df.ncols)
  let remainCols = getKeys(df).toHashSet.difference(cols.toHashSet)  <- here is the error from datamancer

@Vindaar any clues to what might cause this?

Vindaar commented 2 years ago

a bit weird since in datamancer that exact line is runnableExamples:

  runnableExamples:
    let df = toDf({"A" : [1, 8, 0], "B" : [3, 4, 0], "C" : [5, 7, 2]})
    let dfRes = df.gather(df.getKeys(), ## get all keys to gather
                          key = "Class", ## the name of the `key` column
                          value = "Num")
    doAssert "Class" in dfRes
    doAssert "Num" in dfRes
    doAssert dfRes.ncols == 2
    doAssert dfRes["Class", string] == ["A", "A", "A", "B", "B", "B", "C", "C", "C"].toTensor
    doAssert dfRes["Num", int] == [1, 8, 0, 3, 4, 0, 5, 7, 2].toTensor

  result = C.newDataTable(df.ncols)
  let remainCols = getKeys(df).toHashSet.difference(cols.toHashSet)  <- here is the error from datamancer

@Vindaar any clues to what might cause this?

Hmm, well the logical explanation from the error to me seems like a missing import sets (or export sets in datamancer. A bit confused that this is now broken and wasn't before? But maybe I missed it due to the CI failures on datamancer, which I still haven't addressed, sigh.

edit: but don't waste too much time on it. I can take a look tomorrow.

pietroppeter commented 2 years ago

the error to me seems like a missing import sets (or export sets

that makes sense

Vindaar commented 2 years ago

Closing & reopening to see if new version fixes the CI.

Vindaar commented 2 years ago

Guess there's more like it...

pietroppeter commented 1 year ago

now, it seems all ok. I think we would merge this, since anyway in the future if we have an error is better to be able to see it and currently the async build does not allows us to do it.

HugoGranstrom commented 1 year ago

Merging this until nimiBook has an option to disable async assume?

pietroppeter commented 1 year ago

Yep, either an option to disable async or (better) fixed the bug that caused to error out with reporting the actual error (even better both...)

HugoGranstrom commented 1 year ago

Ok yes then I agree 👍 fixing the bug would be the best solution of course.

HugoGranstrom commented 1 year ago

Any objections to this temporary fix? @Vindaar @Clonkk

Clonkk commented 1 year ago

If it works, it works.