Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

ModuleNotFoundError: No module named 'limesurveyrc2api.limesurvey'

  • Brad Rhoads
  • Brad Rhoads's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 1 month ago #159631 by Brad Rhoads
I'm trying to use the Python3 api - limesurveyrc2api - but the import is failing with ModuleNotFoundError: No module named 'limesurveyrc2api.limesurvey'

pip3 list show's it's installed:
Code:
pip3 list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
certifi (2017.7.27.1)
chardet (3.0.4)
Django (1.11.6)
idna (2.6)
limesurveyrc2api (1.0.0) <=== it's there!
pip (9.0.1)
pytz (2017.2)
requests (2.18.4)
setuptools (36.5.0)
urllib3 (1.22)
wheel (0.30.0)

Here's the error:
Code:
 
acBook-Pro-de-Brad:~ bradrhoads$ python3
Python 3.6.3 (default, Oct  4 2017, 06:09:15)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from limesurveyrc2api.limesurvey import LimeSurvey
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'limesurveyrc2api.limesurvey'
>>>
 

What am I doing wrong? Thanks!
The topic has been locked.
  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
7 years 1 month ago #159636 by tammo
First guess: did you turn on the API in the Admin interface? By default it is not turned on.

Tammo


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
7 years 1 month ago #159642 by DenisChenu

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
7 years 1 month ago #159657 by bdrhoa
Just the one line:

from limesurveyrc2api.limesurvey import LimeSurvey
The topic has been locked.
More
7 years 1 month ago - 7 years 1 month ago #159658 by bdrhoa
It is on.

But the problem is with the python interpreter not finding the library.
Last edit: 7 years 1 month ago by bdrhoa.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
7 years 1 month ago #159664 by DenisChenu
I'm not a python specialist, but i surely look and ask to python specific forum docs.python.org/3/library/exceptions.html#ModuleNotFoundError

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
6 years 1 month ago #175059 by democracygps
If you install limesurveyrc2api using pip, the following seems to work:

from limesurveyrc2api.limesurveyrc2api import LimeSurveyRemoteControl2API as LimeSurvey
The following user(s) said Thank You: Hun_Nils
The topic has been locked.
Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose