B Appendix - Troubleshooting
As a first step, always ensure you are using the latest version of the motus package (see section @ref(checkVersion.B)), and you have all required packages installed, loaded, and up to date (see Chapter 2).
While attempting to download data with the motus package, you may encounter errors, many of which are likely due to an interrupted connection. Always ensure you are connected to the internet when using the tagme() function with ‘update = TRUE’. Most issues can be solved by either logging out of the motus package, or by restarting R and resuming the download using tagme(). If errors persist and you are unable to download your data, the server may be temporarily offline. Please contact Motus with any concerns at email@example.com.
B.1 Logging out of motus
B.2 Resume data download
To resume your data download, run tagme() again, but do not include ‘new = TRUE’:
tagme(project.num, update = TRUE, dir = ...)
B.3 Common error messages and solutions:
B.3.1 I get the message “Auto-disconnecting SQLiteConnection” one or multiple times after using tagme()
If this occurs after data download has finished, this message can be ignored. If it occurs during an active download, the connection will usually be maintained and the download will continue. However if the download stops, simply run tagme() again. If that does not work, we suggest logging out of the motus package or restarting R (see sections B.1 and B.2).
B.3.2 I get an “Internal Server Error” message when using tagme(…, update = TRUE)
If you get this message while updating your .motus file, use tagme() again to continue the download.
B.3.3 I get an “Error: Forbidden” message when using tagme()
This error may occur if you are attempting to download multiple projects simultaneously from the same user account. If you get this error, please logout of the motus package, and try tagme() again (see sections B.1 and B.2).
B.3.4 I get an error “Object ‘xxxx’ not found”, referring to a table or field name, or some of your examples in the book do not work.
Be sure to start the steps from the top of the chapter and run them in sequential order. Another possibility is that your .motus database hasn’t been updated to support the latest version of the motusClient or the motus package. If the checkVersion function returns a warning, this may indicate that the internal function used to update your database has not been triggered by tagme(). This can happen, for example, if you load the motusClient package without also loading the motus package. Loading the motus package will also load motusClient, so you should only ever need load motus into your R library.
To ensure that your .motus file is up-to-date with the motus package:
sql.motus <- tagme(project.num, dir = ...) checkVersion(sql.motus)
To correct any warnings, you should follow these steps:
- download the latest versions of the motusClient and then the motus package (refer to Chapter 2).
- terminate and restart your R session.
- load the motus library using ‘require(Motus)’ in your R console.
- load your sqlite file. Look for notes on the console indicating that your database is being updated.
- check the version again.
library(motus) sql <- tagme(project.num, dir = ...) checkVersion(sql)
B.3.5 I get an error “Error in rsqlite_connect(dbname, loadable.extensions, flags, vfs) : Could not connect to database: unable to open database file” when attempting to run tagme()
If you get this message, it’s likely that you’re attempting a new download or update to a non-existant directory. The directory is specified in the dir = “” command of the tagme() function. If the directory is not specified, files will be saved to your working directory. Use getwd() to determine your current working directory. Use setwd() to set a new working directory. To specify a location to save files from your working directory use “./” followed by the file path.
getwd() # show working directory, in this case it's 'C:/Documents' tagme(proj.num, new = TRUE, update = TRUE) # downloads data to your working directory tagme(proj.num, new = TRUE, update = TRUE, dir = "./data/") # downloads data to the data folder within your working directory ie. the file path C:/Documents/data tagme(proj.num, new = TRUE, update = TRUE, dir = "C:/Downloads") # downloads data to the file path C:/Downloads
Of course, there is always the possibility that the book contains errors! If this does not work, please contact firstname.lastname@example.org.