Problem in import sqlite3 library in freeradius python module

Mehrzad Moghaddas mehrzadmo at gmail.com
Sun Mar 3 15:07:20 CET 2019


Hi Alan

>Are all of those modules in the same directory?  Do they all have similar
permissions?
yes . yes
>  Are all of those modules in the same directory?

>>> import sqlite3
>>> print (sqlite3.__file__)
/usr/lib/python3.6/sqlite3/__init__.py
>>> import os
>>> print (os.__file__)
/usr/lib/python3.6/os.py

the diffrencess is just sqlite3 is not file is a folder . the others is
xxxx.py file just this one is a folder with multiple files . but they have
same permissions . and when I wrote a program with python that works
correctly .


On Sun, Mar 3, 2019 at 5:21 PM Alan DeKok <aland at deployingradius.com> wrote:

> On Mar 3, 2019, at 8:44 AM, Mehrzad Moghaddas <mehrzadmo at gmail.com> wrote:
> > I have tried to use sqlite3 library in freeradius 3.0.16 python module on
> > ubuntu 18.04 . I have installed freeradius via standard repositories .
> > but I got this error message :
> >
> > reading pairlist file /etc/freeradius/3.0/mods-config/files/pre-proxy
> >  # Instantiating module "linelog" from file
> > /etc/freeradius/3.0/mods-enabled/linelog
> >  # Instantiating module "log_accounting" from file
> > /etc/freeradius/3.0/mods-enabled/linelog
> >  # Instantiating module "python" from file
> > /etc/freeradius/3.0/mods-enabled/python
> > Python version: 2.7.15rc1 (default, Nov 12 2018, 14:31:15)  [GCC 7.3.0]
> > python_function_load - Module 'example' not found
> > <type 'exceptions.ImportError'> (No module named sqlite3)
>
>   Well, that's clear.  Mostly.
>
>   There could be some underlying issue, like it can find the *python*
> sqlite3 module but not the underlying sqlite3 *library*.
>
> > any other library its ok -like os socket and etc -  ! just have problem
> > with sqlite3 !
>
>   Are all of those modules in the same directory?  Do they all have
> similar permissions?
>
>   Where is the sqlite3 dynamic library?  Is it in a standard location?  Or
> a custom one?
>
>   Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list