ccdb error

14 views
Skip to first unread message

Mark Macrae Dalton

unread,
Feb 28, 2024, 11:47:24 AMFeb 28
to GlueX Software

Has anyone received the following error when trying to add a table to ccdb?

name ‘basestring’ is not defined


igal jaegle.

unread,
Feb 28, 2024, 1:22:52 PMFeb 28
to Mark Macrae Dalton, GlueX Software
Which format is your table?

tks ig.

On Wed, Feb 28, 2024 at 11:47 AM Mark Macrae Dalton <dal...@jlab.org> wrote:

Has anyone received the following error when trying to add a table to ccdb?

name ‘basestring’ is not defined


--
You received this message because you are subscribed to the Google Groups "GlueX Software Help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gluex-softwar...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gluex-software/7848C230-0C02-49FD-9677-0195CED02744%40jlab.org.

Mark Macrae Dalton

unread,
Feb 28, 2024, 1:30:01 PMFeb 28
to igal jaegle., GlueX Software

Two tables are 1 column of numbers.
Another table is 3 columns of numbers.

Interestingly, when I run interactively the second time I try to add the error becomes:

‘OperationalError’ object has no attribute ‘message’

the third time the error is:

‘InvalidRequestError’  object has no attribute ‘message’
 
which it remains from then on.

Best,
Mark

Dmitry Romanov

unread,
Feb 28, 2024, 1:31:54 PMFeb 28
to Mark Macrae Dalton, igal jaegle., GlueX Software
Hi All,

The error is relates to running older versions of ccdb on python3 instead of python 2. If there is no python2 on a system, one can try ccdb-v2 branch from github. 

Kind Regards,
Dmitry

From: gluex-s...@googlegroups.com <gluex-s...@googlegroups.com> on behalf of Mark Macrae Dalton <dal...@jlab.org>
Sent: Wednesday, February 28, 2024 1:29:53 PM
To: igal jaegle. <igja...@gmail.com>
Cc: GlueX Software <gluex-s...@googlegroups.com>
Subject: Re: [EXTERNAL] ccdb error
 

Alexander Austregesilo

unread,
Feb 28, 2024, 1:39:05 PMFeb 28
to Dmitry Romanov, Mark Macrae Dalton, igal jaegle., GlueX Software

Which CCDB version are you using? With 1.06.11 in the current default version_5.15.0.xml, we started to use the python3 for the ccdb python interface. A lot of things were tested with the default python3 version.

You could try to do the same thing with version_5.13.0.xml, which still uses python 2.


@Dmity: Someone hard-coded python3 in the bin script for this version:

https://github.com/JeffersonLab/ccdb/blob/1.06.11/bin/ccdb#L1

To view this discussion on the web visit https://groups.google.com/d/msgid/gluex-software/CO6PR09MB81023E34CA0AA68FDB042B79CD582%40CO6PR09MB8102.namprd09.prod.outlook.com.
-- 
Alexander Austregesilo

Staff Scientist - Experimental Nuclear Physics
Thomas Jefferson National Accelerator Facility
Newport News, VA
aaus...@jlab.org
(757) 269-6982

Mark Macrae Dalton

unread,
Feb 28, 2024, 1:51:49 PMFeb 28
to Alexander Austregesilo, Dmitry Romanov, igal jaegle., GlueX Software


I use version_jlab.xml which right now points to version_5.15.0.xml

As you suggested, version_5.13.0.xml does work.  Please can you revert version_jlab.xml to a working version?

Best,
Mark

Alexander Austregesilo

unread,
Feb 28, 2024, 2:02:44 PMFeb 28
to Mark Macrae Dalton, Dmitry Romanov, igal jaegle., GlueX Software

Can you send the command that produces this error? I was not yet able to reproduce it.

We cannot go back if we want to move to Alma9, but I may be able to find a temporary workaround until we fully made the switch to ccdb2.

Mark Macrae Dalton

unread,
Feb 28, 2024, 2:33:13 PMFeb 28
to Alexander Austregesilo, Dmitry Romanov, igal jaegle., GlueX Software


Any ccdb add command produced the error, I tried various tables, different files to upload, interactive or not.  Sqlite files too.  I could happily read the database though.

ccdb -i
+--------------------------+
  CCDB shell v.1.07.00
+--------------------------+

python --version
Python 2.7.12

python3 --version
Python 3.4.3

By the way these version appear  the same for 5.13 and 5.15

Naomi Jarvis

unread,
Mar 22, 2024, 5:32:08 PMMar 22
to Alexander Austregesilo, Dmitry Romanov, Mark Macrae Dalton, igal jaegle., GlueX Software
I find the same error adding values (not a table) to ccdb.

Same solution works - use 5.13.0.

Naomi.

nja...@ifarm1901.jlab.org: ~/mywork/cpp/gaincalibs_v26 ]> ccdb add /CDC/digi_scales -r 100531-100531 newgains/run_100531.txt

name 'basestring' is not defined

[nja...@ifarm1901.jlab.org: ~/mywork/cpp/gaincalibs_v26 ]> grep xml ~/.cshrc
source /group/halld/Software/build_scripts/gluex_env_version.csh /group/halld/www/halldweb/html/halld_versions/version_jlab.xml

[nja...@ifarm1901.jlab.org: ~/mywork/cpp/gaincalibs_v26 ]> source /group/halld/Software/build_scripts/gluex_env_version.csh /group/halld/www/halldweb/html/halld_versions/version_5.13.0.xml
[nja...@ifarm1901.jlab.org: ~/mywork/cpp/gaincalibs_v26 ]> ccdb add /CDC/digi_scales -r 100531-100531 newgains/run_100531.txt
/CDC/digi_scales:100531:default:2024-03-22_17-28-37

Mark Macrae Dalton

unread,
Mar 25, 2024, 10:27:43 AMMar 25
to Naomi Jarvis, Alexander Austregesilo, Dmitry Romanov, igal jaegle., GlueX Software


I just want to clear something up from my case.  The errors I received were using "ccdb add” and not “ccdb mktbl”.  It seems that when I wrote "add" people might have read "create".

Best,
Mark
Reply all
Reply to author
Forward
0 new messages