Dear CCDC Team,

I successfully installed the CCDC Python API on an earlier machine but I am now having problems installing on a new machine.

Everything seems to be working until I get to the point of running the unit tests via run_tests.bat, which generates the error message in the thread title.

I am working on Windows 7, with "vanilla" Python 2.7.12. In case it is relevant, I need to elevate my user privileges via entering the details of an ADMIN account (not the standard account I am logged into) when running things as an ADMIN. I am also able to run the Mercury version 3.8 GUI without any complaints about the license.

I provide a detailed account of the steps I took below.

 

Thank you in advance for your assistance.

 

Best regards,

 

Richard

 

-------------------------------------

I am trying to follow

\csd-python-api-1.0.0-win32-py2.7.zip\ccdc-1.0.0\doc\
installation_notes.txt

C:\UoLeeds_work.PC\work.PC_installation\Python>pip install nose > pip_install_no
se.log 2>&1

=> OK

created this as a SYSTEM variable:

CCDC_ISOSTAR_DATA_DIRECTORY=C:\Program Files (x86)\CCDC\CSD_2016\isostar_files

lxml-3.6.0.win32-py2.7.exe ran as ADMIN [previously downloaed from https://pypi.python.org/pypi/lxml/3.6.0]

=> OK

CSDSQLite-2016-windows-installer.exe ran as ADMIN

=> OK

new cmd>

C:\UoLeeds_work.PC\work.PC_installation\Python>pip install csd-python-api-1.0.0-
win32-py2.7.zip > pip_install_csd-python-api-1.0.0-win32-py2.7.zip_new.pc.log 2>
&1

=> OK

C:\UoLeeds_work.PC\work.PC_installation\Python>python
Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (
Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from ccdc.io import EntryReader as csd_ER
>>>

=> OK

https://downloads.ccdc.cam.ac.uk/documentation/API/installation_notes.html#testing-your-installation
=>

C:\UoLeeds_work.PC\work.PC_installation\Python\csd-python-api-1.0.0-win32-py2.7\
ccdc-1.0.0\tests>run_tests.bat > run_tests.bat.my.pc.log 2>&1

=>

INITIALLY, THIS WAS FAILING WITH "No valid licence located. Access is available to all organisations and institutions."

=>

https://www.ccdc.cam.ac.uk/forum/csd_python_api/Help/c9e372a7-8a24-e511-b195-005056975d8a

=>

I SET CSDHOME=C:\Program Files (x86)\CCDC\CSD_2016\CSD V5.37 [as a SYSTEM variable]

=>

new cmd>
[as ADMIN, as before]


C:\UoLeeds_work.PC\work.PC_installation\Python\csd-python-api-1.0.0-win32-py2.7\
ccdc-1.0.0\tests>run_tests.bat > run_tests.bat.work.pc.log 2>&1

=>

"RuntimeError: Welcome to the CSD Python API.
No valid licence located. Access is available to all organisations and institutions.
To find details for your company or university please contact admin@ccdc.cam.ac.uk."

 

Hi Richard,

 

On Windows the CSD Python API should use the registry key entries set up by the CSDS installer to work out where your data directory is, and if that contains a csd_licence.dat licence file then it should pick it up from there. You can use CSDHOME to override this, but usually it should not be necessary.

 

Mercury is one of the programs in the CSD package that can be started without a licence present (it will have reduced functionality until the package is licensed) so it is worth checking it by going to Help->About Mercury. Does it state it is registered, and if so where is the licence file it is stating it is using? Note that for the API to pick up the licence file automatically it will need to either be in the CSD data directory (in your case C:\Program Files (x86)\CCDC\CSD_2016\CSD V5.37) or in the home area of the user that is running it. With use of admin/user accounts in your post, I'd recommend the licence file being located in the database directory so all users can access it.

Note that rather than trying to run the tests, the correct reading of a licence can be tested with the following at your python command line prompt:

 

import ccdc.io

ccdc.io.EntryReader('CSD')

 

This should output the CSD databases in use if the licence check passes and give the error you have described if not.

 

Lastly, if your organisation has access to the 2017 release, I would recommend taking a look at that - it comes with its own python pre-installed for ease of use.

 

Regards,

 

Dave

 

Hi Dave,

 

Many thanks for your support.

 

I ran the Mercury GUI Help check you proposed and it tells me the license status is normal and the license file was in the expected location.

 

I've now realised that, although I needed to run the installation using a local ADMIN account, I needed to run the command prompt using my login, non-ADMIN, account in order to solve this problem. Once I did that, I could run the  Python interpreter test you proposed without errors and run_tests.bat seems to be working correctly.

Best regards,

Richard

 

 

You must be signed in to post in this forum.