Ah, my bad. That's all relevant questions. I do get an error, an OS "Bad File Descriptor" error. Tracing it up, there's a java "Array out of bounds" error. Notably, the same files can be inserted into a clean database using "ADD", but not "REPLACE". I didn't check if the files get added to an index.
I don't believe there's an issue with the paths. I'll modified the paths to preserve private data.. New file provided, and a stack trace file. I demonstrate code that's effectively identical, but the only difference is "ADD" vs "REPLACE", and cache vs not. There issue seems to be the files themselves, not adding from the folder vs not, since adding the folder vs the files directly doesn't change anything that I've noticed. Cheers, Daniel On Tue, Jan 12, 2021 at 6:14 PM Liam R. E. Quin <l...@fromoldbooks.org> wrote: > On Tue, 2021-01-12 at 16:38 -0500, Daniel Kaplan wrote: > > Hello, > > > > I'm experiencing some issue(s) when using BaseX... wanted to report > > it > > here, but not sure what information you need. > > Imagine for a moment that it does not happen for anyone else... > > What exactly goes wrong, in detail? Is there an error message? Are > wrong vaues inserted into the database? Do your shoes fall off? Do the > files get added into the index? How did you determine that something > went wrong? > > There seems to be a missing double quote in your Python script, could > this be your error? And a space in "data/ /BadFileFolder" - try withut > having a space in the filename maybe? > > Liam > > -- > Liam Quin, https://www.delightfulcomputing.com/ > Available for XML/Document/Information Architecture/XSLT/ > XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. > Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org > >
OSError: Improper use? Potential bug? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 9.4.5 Java: Red Hat, Inc., 1.8.0_275 OS: Linux, amd64 Stack Trace: java.lang.ArrayIndexOutOfBoundsException: 247 at org.basex.util.Compress.isSet(Compress.java:148) at org.basex.util.Compress.unpack(Compress.java:112) at org.basex.data.DiskData.txt(DiskData.java:307) at org.basex.data.DiskData.text(DiskData.java:273) at org.basex.data.Data.insert(Data.java:801) at org.basex.query.up.atomic.Insert.apply(Insert.java:44) at org.basex.query.up.atomic.AtomicUpdateCache.applyUpdates(AtomicUpdateCache.java:294) at org.basex.query.up.atomic.AtomicUpdateCache.execute(AtomicUpdateCache.java:278) at org.basex.core.cmd.Replace.replace(Replace.java:106) at org.basex.core.cmd.Replace.access$0(Replace.java:70) at org.basex.core.cmd.Replace$1.run(Replace.java:58) at org.basex.core.cmd.ACreate.update(ACreate.java:90) at org.basex.core.cmd.Replace.run(Replace.java:55) at org.basex.core.Command.run(Command.java:257) at org.basex.core.Command.execute(Command.java:93) at org.basex.server.ClientListener.run(ClientListener.java:143)
from BaseXClient import BaseXClient def oneOf(): """Does not work""" session = BaseXClient.Session('localhost', 1984, 'admin', 'admin') session.execute("create db database") session.execute("SET AUTOFLUSH false") session.execute("SET ADDCACHE true") session.execute("REPLACE data/ /home/MYNAME/Documents/Workspace/PROJECTNAME/SUBFOLDER/BadSingles/Ass.xml") session.execute("FLUSH") """Works""" # session = BaseXClient.Session('localhost', 1984, 'admin', 'admin') # session.execute("create db database") # session.execute("SET AUTOFLUSH false") # session.execute("SET ADDCACHE true") # session.execute("ADD TO data/ /home/MYNAME/Documents/Workspace/PROJECTNAME/SUBFOLDER/BadSingles/Ass.xml") # session.execute("FLUSH") """Also works""" # session = BaseXClient.Session('localhost', 1984, 'admin', 'admin') # session.execute("create db database") # session.execute("REPLACE data/ /home/MYNAME/Documents/Workspace/PROJECTNAME/SUBFOLDER/BadSingles/Ass.xml") # session.execute("FLUSH") oneOf()