Skip to main content

Failure Modes

DVC has several failure scenarios where the system degrades silently rather than surfacing a clear error. This page documents every known failure mode, its symptom, the responsible code path, and the recovery action.

Data is never lost

DVC is designed so that a failure to push or sync never destroys data. Acquisitions are committed to the local git repository first; network failures only delay the push. Any commits queued while offline can be pushed later via Tools → Share Changes.

GitHub / GitLab Unreachable

Failure pointSymptomRecovery
MetaRepo clone at startuptest_dvc_fetch_meta turns red; no dialog shownCheck network and restart Pychron
meta_pull() at startupSame red startup testCheck network and restart
push_repository() after acquisitionNon-fatal dialog: "DVC/Git upload not successful. Cancel the experiment?"Accept non-fatal — data is committed locally. Push when network is restored via Tools → Share Changes.
meta_push() after acquisitionSame non-fatal dialogSame recovery
gi.create_repo() (new data repo creation)Silent success reported even though the repo was not created; SSLError sets _has_access = FalseManually create the repo on GitHub/GitLab, then re-run experiment setup
gi.get_repos() listingRepo browser shows empty listRestart Pychron once network is restored

The silent MetaRepo abort

This is the most critical failure mode for new lab setups. In DVC.initialize():

try:
self.open_meta_repo()
except BaseException as e:
self.warning("Error opening meta repo {}".format(e))
return # ← no dialog, no exception — returns None silently

If open_meta_repo() fails for any reason — network timeout, bad credentials, missing repo, SSL certificate error — Pychron logs a one-line warning and continues loading. The application appears to start normally. The only visible indication is that the startup test test_dvc_fetch_meta stays red.

Always check ~/.pychron.<app>/logs/pychron.log and search for "Error opening meta repo" when DVC isn't working after startup.

Credential failures

ScenarioSymptomRecovery
GitHub PAT expired or wrong scopeCredentialException in log; test_dvc_fetch_meta redGenerate a new PAT with repo scope, update in Preferences → GitHub → Token
GitHub password auth attempted401CredentialExceptionGitHub removed password auth in 2021. Use a PAT.
GitLab token wrong or expiredSame as GitHubUpdate token in Preferences → GitLab
No auth configuredgit clone hangs waiting for interactive inputConfigure a credential helper or set the PAT before launching

Missing or Misconfigured MetaRepo

ScenarioSymptomRecovery
meta_repo_name not setWarning dialog on startup: "Need to specify Meta Repository name"; DVC aborts initializationSet meta_repo_name in Preferences → DVC → Connection
MetaRepo exists locally but remote is gonemeta_pull() fails with GitCommandError; no remote to pull fromRe-create the remote repo on GitHub/GitLab and push the local clone
MetaRepo not on remote, not local eitheropen_meta_repo() falls through to git init locally; warning: "You need to clone your MetaData repository manually"Create the MetaRepo on GitHub/GitLab and restart Pychron, or clone manually to <dvc_dir>/<MetaRepoName>/
MetaRepo freshly cloned, emptyDVC._defaults() auto-creates placeholder files and commits themPopulate irradiation data via Entry → Irradiation
Wrong organization in preferencesRepo lookup returns nothing; clone URL is None; open_meta_repo() inits locally insteadCorrect the organization name in both Preferences → DVC → Connection and Preferences → GitHub/GitLab

Database Failures

ScenarioSymptomRecovery
MySQL not running at startuptest_database turns red; db.connection_error string shown in startup test detailStart MySQL: brew services start mysql (macOS) or systemctl start mysql (Linux)
Wrong MySQL credentialsSame red test_databaseCorrect host/username/password in Preferences → DVC → Connection
pychronmeta database missingOperationalError: Unknown database 'pychronmeta' in logmysql -u root -e "CREATE DATABASE pychronmeta CHARACTER SET utf8mb4;" then re-run alembic upgrade head
Schema not migratedOperationalError: Table 'X' doesn't existcd alembic_dvc && alembic upgrade head
Mid-session MySQL disconnectOperationalError on next query; Pychron does not auto-reconnectRestart Pychron after MySQL recovers
Database error during acquisitionDVCPersister catches DatabaseError; experiment is halted with "Fatal — DatabaseError, see log"Fix MySQL connection, restart Pychron, and re-queue the experiment

data_collection branch sync failure

When use_data_collection_branch=true, Pychron calls sync_repo_from_data_collection() each time a data repo is loaded for reduction. This merges the origin/data_collection branch into the current branch. If the merge fails:

  • The failure is caught as BaseException and logged as: "This can be expected for local-only repos."
  • No dialog is shown. Data reduction proceeds from the current local branch state.
  • If a merge was expected to deliver new acquisition data, reduction results will be stale.

Recovery: Pull and merge manually via the Repositories task, or set use_data_collection_branch=false if not actively using the branch separation workflow.


Checking the Log

All DVC warnings and errors are written to:

~/.pychron.<app>/logs/pychron.log

Useful search terms: DVC, meta_repo, Error opening meta repo, GitCommandError, OperationalError, CredentialException.