Python "import" statement fails for any module in /site-packages/ when run by radiusd from example.py

Jorge Pereira jpereira at freeradius.org
Thu Mar 12 19:24:18 CET 2020


> On 12 Mar 2020, at 15:21, Gleb Lisikh <in4bit.general at gmail.com> wrote:
> 
> Thanks Jorge!
> 
> Thank you so much for your prompt response!!
> 
> FreeRADIUS Version 3.0.20
> Python version: 2.7.5 (default, Dec  4 2019, 17:34:13)  [GCC 4.8.5 20150623 (Red Hat 4.8.5-39.0.1)]
> 
> Are you saying that what I described is a known problem/bug, and that 3.0.21 deals with it? Any references that would detail this?
> 

It was fixed as can be seen in https://github.com/FreeRADIUS/freeradius-server/pull/3184 <https://github.com/FreeRADIUS/freeradius-server/pull/3184>
> Thank you again!
> 
> Gleb 
> 
> 
> 
> On Thu, Mar 12, 2020 at 2:06 PM Jorge Pereira <jpereira at freeradius.org <mailto:jpereira at freeradius.org>> wrote:
> Hi,
> 
> Which version are you running? Because it was fixed a few months ago and It only will be available on next 3.0.21. But, you could build your own version from the latest code base in https://github.com/FreeRADIUS/freeradius-server/commits/v3.0.x <https://github.com/FreeRADIUS/freeradius-server/commits/v3.0.x> and see if your tests will work fine.
> 
> ---
> Jorge Pereira
> jpereira at freeradius.org <mailto:jpereira at freeradius.org>
> 
> 
> 
> 
>> On 12 Mar 2020, at 14:58, Gleb Lisikh <in4bit.general at gmail.com <mailto:in4bit.general at gmail.com>> wrote:
>> 
>> Before I go into exact code, paths, version etc. any general advice or
>> troubleshooting steps for figuring out why python import statement fails to
>> execute for any python library I try to call for
>> from /etc/raddb/mods-config/python/example.py?
>> 
>>   - example.py runs fine for other python statements
>>   - I can do "import sys" and it works fine, but sys is a built in python
>>   module
>>   - I can execute "import" for any python module defined
>>   under /usr/lib/python2.7/site-packages/ in python environment under radiusd
>>   users (e.g. sudo -u radiusd python)
>> 
>> I am very amateur when it comes to linuz, so please bear with me...
>> 
>> Thank you!
>> 
>> Gleb Lisikh
>> -
>> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html <http://www.freeradius.org/list/users.html>



More information about the Freeradius-Users mailing list