We're Hiring!

import: Directory exists but is not registered: CheckedPath(

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

import: Directory exists but is not registered: CheckedPath(

Postby jwarren » Wed Jan 28, 2015 2:21 pm

Hi

I'm trying to experiment on my mac with the inplace importer but having this error wherever I try and access the image "import: Directory exists but is not registered: CheckedPath(root_0)"

I'm running as me so have access to the directories etc so don't think it's a permissions setup issue.

How do I register a directory?

(Note I'm using a fork from the 5.1.0 from the git repo).

Code: Select all
Current group: system
2015-01-28 14:12:32,839 1854       [      main] INFO          ome.formats.importer.ImportConfig - OMERO Version: 5.1.0-m4-ice35-SNAPSHOT
2015-01-28 14:12:32,859 1874       [      main] INFO          ome.formats.importer.ImportConfig - Bioformats version: 5.1.0-m4-ice35-SNAPSHOT revision: 647e519 date: 22 January 2015
2015-01-28 14:12:32,868 1883       [      main] INFO   formats.importer.cli.CommandLineImporter - Setting transfer to ln_s
2015-01-28 14:12:32,873 1888       [      main] INFO   formats.importer.cli.CommandLineImporter - Log levels -- Bio-Formats: ERROR OMERO.importer: INFO
2015-01-28 14:12:33,279 2294       [      main] INFO      ome.formats.importer.ImportCandidates - Depth: 4 Metadata Level: MINIMUM
2015-01-28 14:12:33,358 2373       [      main] INFO      ome.formats.importer.ImportCandidates - 1 file(s) parsed into 1 group(s) with 1 call(s) to setId in 75ms. (79ms total) [0 unknowns]
2015-01-28 14:12:33,664 2679       [      main] INFO       ome.formats.OMEROMetadataStoreClient - Attempting initial SSL connection to localhost:4064
2015-01-28 14:12:34,265 3280       [      main] INFO       ome.formats.OMEROMetadataStoreClient - Insecure connection requested, falling back
2015-01-28 14:12:34,624 3639       [      main] INFO       ome.formats.OMEROMetadataStoreClient - Server: 5.1.0
2015-01-28 14:12:34,624 3639       [      main] INFO       ome.formats.OMEROMetadataStoreClient - Client: 5.1.0-m4-ice35-SNAPSHOT
2015-01-28 14:12:34,624 3639       [      main] INFO       ome.formats.OMEROMetadataStoreClient - Java Version: 1.7.0_25
2015-01-28 14:12:34,624 3639       [      main] INFO       ome.formats.OMEROMetadataStoreClient - OS Name: Mac OS X
2015-01-28 14:12:34,624 3639       [      main] INFO       ome.formats.OMEROMetadataStoreClient - OS Arch: x86_64
2015-01-28 14:12:34,624 3639       [      main] INFO       ome.formats.OMEROMetadataStoreClient - OS Version: 10.7.5
2015-01-28 14:13:14,739 43754      [      main] INFO   ormats.importer.cli.LoggingImportMonitor - FILESET_UPLOAD_PREPARATION
2015-01-28 14:13:14,842 43857      [      main] ERROR        ome.formats.importer.ImportLibrary - Error on import: Directory exists but is not registered: CheckedPath(root_0)

jwarren
 
Posts: 102
Joined: Wed Jul 09, 2014 1:35 pm

Re: import: Directory exists but is not registered: CheckedP

Postby sbesson » Thu Jan 29, 2015 12:57 pm

Hi,

a similar issue has been described previously in viewtopic.php?f=5&t=7537.

Can you do the same operation, i.e check under `ManagedRepository` has a `root_0` folder under it. Is this a fresh database? if so, this means the database is out-of-sync with the binary repository and removing the content of this `root_0` folder should be enough to solve your issue.

Best,
Sebastien
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm

Re: import: Directory exists but is not registered: CheckedP

Postby jwarren » Thu Jan 29, 2015 5:39 pm

Great - thanks that worked. I did see that issue but thought I had done something more basic- sorry about that.
I guess I need to remove any files from the other data directories such as thumbnails as well because I get different thumbnails to the img in detail :)

Thanks again.
jwarren
 
Posts: 102
Joined: Wed Jul 09, 2014 1:35 pm

Re: import: Directory exists but is not registered: CheckedP

Postby sbesson » Thu Jan 29, 2015 6:45 pm

Hi,

if you are developing locally, a good practice when re-initializing a new database is definitely to drop the database and clean the data repository, for example using the default values under Unix:

Code: Select all
dropdb omero
createdb -O omero omero
bin/omero db script -f OMERO.sql
psql -U omero omero -f OMERO.sql
rm -rf /OMERO/*


On the other hand, we will investigate ways to detect stale FS directories and throw an appropriate warning.

Best,
Sebastien
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm

Re: import: Directory exists but is not registered: CheckedP

Postby jwarren » Tue Feb 03, 2015 10:07 am

Thanks for this response - your suggestions for improvements sound a good idea.

I'm now having trouble running the cli from my python script.When I run it from the command line it works ok with the extra "--" like this as in the docs: bin/omero import -- --transfer=ln_s path_to_file/45008.bmp

but when I try to run this within a python script it always complains whatever way I write it? Can you point me to a working example for transfer=ln_s ?

import_args.extend(["-d", str(dsId),"--debug", "ERROR", "--transfer","ln_s"])

results in unknown option ln_s

import_args.extend(["-d", str(dsId),"--debug", "ERROR", "--","", "--transfer","ln_s"])
results in a file not found exception?

(Note both have import_args.append(filename) afterwards).

What does the extra -- mean anyway?

Sorry if these seem like silly questions but I've spent a bit of time trying to get this to work already.


Thanks

Jonathan.
jwarren
 
Posts: 102
Joined: Wed Jul 09, 2014 1:35 pm

Re: import: Directory exists but is not registered: CheckedP

Postby manics » Tue Feb 03, 2015 10:29 am

Hi Jonathan

The CLI importer uses a Java library behind the scenes to do the import, the `--` is a special flag to indicate advanced options which are passed directly to Java. In your python code you should be able to directly convert your command line string (including the `--`, keeping all arguments in the same order) into a python string array. If that doesn't work could you post the whole of your Python script?

Thanks

Simon
User avatar
manics
Team Member
 
Posts: 261
Joined: Mon Oct 08, 2012 11:01 am
Location: Dundee


Return to Developer Discussion

Who is online

Users browsing this forum: Google [Bot] and 0 guests