degauss-org / dht

DeGAUSS helper tools
http://degauss.org/dht
GNU General Public License v3.0
4 stars 1 forks source link

Error when running DeGAUSS through dht #102

Closed asitemade4u closed 1 year ago

asitemade4u commented 1 year ago

Hi, Thank you for the integration of DeGAUSS with R. Much appreciated.

However, while geocoding addresses of NYC, I am facing a recurring error. Here is the backtrace:

✔ imported data from degauss_100c49bea68e.csv
ℹ removing non-alphanumeric characters...
ℹ removing excess whitespace...
ℹ parsing addresses...
Error:
! Column name `road` must not be duplicated.
Use .name_repair to specify repair.
Caused by error in `repaired_names()`:
! Names must be unique.
✖ These names are duplicated:
  * "road" at locations 1 and 3.
Backtrace:
     ▆
  1. ├─dplyr::rename_with(...)
  2. ├─dplyr::bind_rows(...)
  3. │ └─rlang::list2(...)
  4. ├─purrr::modify(...)
  5. └─purrr:::modify.default(...)
  6.   ├─tibble (local) .f(.x[[i]], ...)
  7.   └─tibble:::as_tibble.list(.x[[i]], ...)
  8.     └─tibble:::lst_to_tibble(x, .rows, .name_repair, col_lengths(x))
  9.       └─tibble:::set_repaired_names(x, repair_hint = TRUE, .name_repair)
 10.         ├─rlang::set_names(...)
 11.         └─tibble:::repaired_names(= NULL)
 12.           ├─tibble:::subclass_name_repair_errors(...)
 13.           │ └─base::withCallingHandlers(...)
 14.           └─vctrs::vec_as_names(...)
 15.             └─vctrs (local) `<fn>`()
 16.               └─vctrs:::validate_unique(names = names, arg = arg, call = call)
 17.                 └─vctrs:::stop_names_must_be_unique(names, arg, call = call)
 18.                   └─vctrs:::stop_names(...)
 19.                     └─vctrs:::stop_vctrs(...)
 20.                       └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = vctrs_error_call(call))
Execution halted
Error in `dplyr::left_join()`:
! Join columns in `y` must be present in the data.
✖ Problem with `address`.

And here is the trace to the error:

<error/rlang_error>
Error in `dplyr::left_join()`:
! Join columns in `y` must be present in the data.
✖ Problem with `address`.
---
Backtrace:
    ▆
 1. └─dht::degauss_run(plctst, "postal", "0.1.1")
 2.   ├─dplyr::left_join(.x, .x_output, by = degauss_input_names, na_matches = "never")
 3.   └─dplyr:::left_join.data.frame(.x, .x_output, by = degauss_input_names, na_matches = "never")
Run rlang::last_trace(drop = FALSE) to see 4 hidden frames.

I also attach the csv file I am trying to geocode: degauss_4.csv

Thanks, S.

asitemade4u commented 1 year ago

Actually, I was following the example you gave in the documentation that was using postal v.0.1.1 Now that I have switched to latest, it works fine.

asitemade4u commented 1 year ago

Maybe it would be a good idea to change the documentation...

cole-brokamp commented 1 year ago

Thank you for the tip! It does sound like documentation won't work as expected using version 0.1.1 of the parcel container, and we should change it to 0.1.4

asitemade4u commented 1 year ago

BTW, DeGAUSS is absolutely amazing. I tried geocoding using Nominatim then Photon and faced serious issues. DeGAUSS was right the first time!

erikarasnick commented 1 year ago

https://degauss.org/dht/articles/calling-degauss-from-R.html

erikarasnick commented 1 year ago

Thanks, @asitemade4u! We have updated the documentation to reference postal:0.1.4.

We appreciate your feedback about DeGAUSS. Would you mind taking our user survey at degauss.org/survey/ ?