Skip to main content
Solved

SQL Executor Read Only on SQLite


hkingsbury
Celebrity
Forum|alt.badge.img+55

Hey All

I have a process with the general workflow of create an SQLite database (FeatureWriter) and then run schema/index/relationship queries against it using an SQLExecutor.

Initially, this was built in 2020.2 and works well (see example attached). However from ~2023.2 onwards, this logic no longer works.

 

I get the following error when running in version newer than 2023 (including the latest 2025 releases)

SQLite Reader: Failed to read a feature from the database. SQLite3 Engine error: 'attempt to write a readonly database'

Looking at the database, it’s not read only, I can read/write to it with other programs. I’ve also tried it when FME is running as administrator and writing out to different folder locations.

I can replace the SQLExecutor with a PythonCaller and it works fine. It also works fine when the SQL is included in the writer to run after writing. In some instances, I can using the run after writing approach, but in others I do need to do standalone calls to the db to manipulate the schema.

Has anyone come across this before? I have also raised a bug directly with Safe

 

Best answer by hkingsbury

takashi wrote:

Hi ​@hkingsbury ,

I was able to reproduce the error with FME 2023 or later, running with FME Workbench Feature Caching mode.

Interestingly, however, the error didn't appear when running the workspace without Feature Caching, or with FME Quick Translator, even if the version of FME is 2023 or later. I think the issue is on SQLite writer running with Feature Caching mode.

Hope someone from Safe to take a look into this.

 

Good find, so it’s something to do with feature caching then….

 

I’ve had a further play around and figured out what the issue is - I think!

 

When Features to Read is set to Schema and Data Features, it gives the read only error
 

 

When you set it to Data features, it works

 

 

When you set it to Schema features, it also works!

So it looks to only fail when both Schema and Data features are read

View original
Did this help you find an answer to your question?

2 replies

takashi
Influencer
  • June 17, 2025

Hi ​@hkingsbury ,

I was able to reproduce the error with FME 2023 or later, running with FME Workbench Feature Caching mode.

Interestingly, however, the error didn't appear when running the workspace without Feature Caching, or with FME Quick Translator, even if the version of FME is 2023 or later. I think the issue is on SQLite writer running with Feature Caching mode.

Hope someone from Safe to take a look into this.


hkingsbury
Celebrity
Forum|alt.badge.img+55
  • Author
  • Celebrity
  • Best Answer
  • June 18, 2025
takashi wrote:

Hi ​@hkingsbury ,

I was able to reproduce the error with FME 2023 or later, running with FME Workbench Feature Caching mode.

Interestingly, however, the error didn't appear when running the workspace without Feature Caching, or with FME Quick Translator, even if the version of FME is 2023 or later. I think the issue is on SQLite writer running with Feature Caching mode.

Hope someone from Safe to take a look into this.

 

Good find, so it’s something to do with feature caching then….

 

I’ve had a further play around and figured out what the issue is - I think!

 

When Features to Read is set to Schema and Data Features, it gives the read only error
 

 

When you set it to Data features, it works

 

 

When you set it to Schema features, it also works!

So it looks to only fail when both Schema and Data features are read


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings