1 (edited by namwebs 18-07-2020 17:52:01)

Topic: Importing CSV doesn't allow me to choose species list

Hi,

When I try to import a CSV using the method that has previously worked (before upgrading) the option to choose the species list is blank even though there are 9 species lists defined in the system. The import then fails.

The attached file shows a screenshot of how it used to be and how it is now.

Any ideas how to fix this?

Is it related to the message about the Master species checklist on the home page ("Although not essential, if you have a single species checklist which contains a full taxonomic hierarchy, then you should add this list's ID to Indicia's warehouse configuration.")? I haven't done this as I don't have a single list...

This is on Indicia version 3.1.6

Thanks for any pointers.

Post's attachments

import.docx 97 kb, 1 downloads since 2020-07-18 

You don't have the permssions to download the attachments of this post.

2

Re: Importing CSV doesn't allow me to choose species list

might be worth checking the website of the species list(s) - I've just had a look and it certainly can cause that behaviour...

I think if you have the species lists set to <warehouse> it should allow selection - at least it does in my installation (4.0.8)

3

Re: Importing CSV doesn't allow me to choose species list

Hi Iain, Thanks very much for the suggestion. I tried changing this and it didn't make a difference...  The website is Namibia Biodiversity Recording and the species lists are all set to be 'owned' by that. Changing to either of the other options I have (<Warehouse> or <Demonstration website>) didn't help. I'm not sure what else to try.

4

Re: Importing CSV doesn't allow me to choose species list

another thing worth checking is if scheduled_tasks has been run recently?

5 (edited by namwebs 19-07-2020 10:25:21)

Re: Importing CSV doesn't allow me to choose species list

Thanks Iain,
I ran scheduled_tasks and cache_rebuild a couple of times and it's still the same... It's odd because it lists the Survey datasets correctly and they are attributed to the same website as the Species lists.

Edit - To test if it is a cache issue, I created a new species list with the 'Owned by website' set to my website and it didn't show in the list in the Occurrences import options either.

6

Re: Importing CSV doesn't allow me to choose species list

have you checked the log file on the server just in case there's a clue in there...

it's under the indicia folder application>logs>{today's date}.php - as an example mine is at

indicia>application>logs>2020-07-18.php

7

Re: Importing CSV doesn't allow me to choose species list

There are a couple of errors in the log but nothing is added when I try to do the import, so I'm not sure they are related. This kind of thing:

2020-07-20 09:20:15 +02:00 --- error: Missing i18n entry general_errors.There was an SQL error: ERROR:  invalid input syntax for integer: ""
LINE 4: AND "cache_termlists_terms"."id" = ''
                                           ^ - SELECT "cache_termlists_terms"."id", "cache_termlists_terms"."preferred", "cache_termlists_terms"."termlist_id", "cache_termlists_terms"."termlist_title", "cache_termlists_terms"."website_id", "cache_termlists_terms"."preferred_termlists_term_id", "cache_termlists_terms"."parent_id", "cache_termlists_terms"."sort_order", "cache_termlists_terms"."term", "cache_termlists_terms"."language_iso", "cache_termlists_terms"."language", "cache_termlists_terms"."preferred_term", "cache_termlists_terms"."preferred_language_iso", "cache_termlists_terms"."preferred_language", "cache_termlists_terms"."meaning_id", "cache_termlists_terms"."cache_created_on", "cache_termlists_terms"."cache_updated_on", "cache_termlists_terms"."preferred_image_path", "cache_termlists_terms"."allow_data_entry"
FROM cache_termlists_terms
WHERE ("cache_termlists_terms"."website_id" IN ('2') OR "cache_termlists_terms"."website_id" IS NULL)
AND "cache_termlists_terms"."id" = '' for language en_GB

8

Re: Importing CSV doesn't allow me to choose species list

Hi Alice,

If you set your log_threshold config setting to 4 (in application/config/config.php) then try it, you should see all the queries run in the warehouse log. I just tried it and there was a query which selected from `list_taxon_lists` that correctly retrieved the lists I could import into. It would be interesting to know if this query is in your log and whether it works OK if you run it manually?

Also, perhaps you could try adding a new Import page with all the default options, setting the data type to import to "Species Records" and leaving all the other settings?

When you're done testing I would set the log_threshold back to 1 or 2 as it can generate large files quite quickly otherwise.

Best wishes
John

John van Breda
Biodiverse IT

9 (edited by namwebs 21-07-2020 15:10:24)

Re: Importing CSV doesn't allow me to choose species list

Thanks John.

I suspect it is this:

SELECT "list_taxon_lists"."id", "list_taxon_lists"."title", "list_taxon_lists"."website_id"
FROM list_taxon_lists
WHERE ("list_taxon_lists"."website_id" IN ('2') OR "list_taxon_lists"."website_id" IS NULL)
ORDER BY "title" ASC

My database doesn't have a table list_taxon_lists...

Edit - Oops, scrap that. I ran the query in the database and it did produce a list of my species groups.

I'm trying your suggestion of creating a data import page (in Drupal). Previously I have been importing CSV files from the Indicia warehouse interface - the link at the bottom of the Occurrences page. With the Drupal page, it does list the Surveys and Species lists correctly so this may be the way to go.

10

Re: Importing CSV doesn't allow me to choose species list

Yes, there's a view called list_taxon_lists. Can you email me a link to the page so I can see the config?

John van Breda
Biodiverse IT