Re: Odd Error in sapdb__init__.py fast ascii
Daniel Dittmar <[email protected]> Wed, 29 Jan 2003 21:39:23 +0100
| Newsgroups | gmane.comp.db.sapdb.sources |
|---|---|
| Organization | SAP AG |
| Message-ID | <[email protected]> |
Post, Mark K wrote: > When I do a complete build (imf all), after deleting everything in > SAPDB_DEV, I get these two errors. But only the first time. If I then turn > around and immediately do another "imf all" without deleting the results of > the first build, I don't see the errors. Daniel, do you have any ideas? > > sqlpyd.dld fast > sql.py fast ascii > sapdb__init__.py fast ascii > !if [ -r $INSTMISC/sqlmodule.so ] ; then rm $INSTMISC/sqlmodule.so ; fi > !PYTHONPATH=$INSTMISC python -c "import sapdb.sql" > Traceback (innermost last): > File "", line 1, in ? > File "/home/mark/V74_03_07/SAPDB_DEV/usr/misc/sapdb/sql.py", line 44,\ > in ? > from python15.sql import * > ImportError: No module named python15.sql > COMMAND error 1 > 'sqlpy.mac' not made because of dependency errors I'll just describe how this is supposed to work: for the python module 'sql', two files are needed: usr/misc/sapdb/sql.py usr/misc/sapdb/pythondef/sqlmodule.so When 'import sapdb.sql' is called from python 1. sql.py gets imported 2. it tries to import pythondef/sqlmodule.so 3. if this failes, it tries other directories depending on the python version (the idea being that there is just one directory to put into the PYTHONPATH, not several depending on the Python version) So if pythondef/sqlmodule.so doesn't get created the first time round, sql.py will look for (in your case) python15/sqlmodule.so. As this isn't there either, the import fails. First check if pythondef/sqlmodule.so is there. If it isn't, something went wrong with the make. Are there other files like sqlmodule.so.f? vmake creates all files with the extension .f (or .q if you do a imq) and then links them to the proper name. The error might not appear on the second imf because vmake might think that there is nothing to do. Daniel Dittmar -- Daniel Dittmar SAP DB, SAP Labs Berlin [email protected] http://www.sapdb.org