-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
seeing errors on the script #5
Comments
Could you elaborate on what system you're using, how you installed the package, and what you would like to do? To be honest I'm not sure what to make of the error message either - is that a strace output? How to get startedAssuming you're also new to Python, and can't quite get started, the following is how to. I can't promise to be able to give this level of support in future but anyway here we go. Start with making a workspace for your project, create a Python virtual environment to keep libraries from clashing across projects, and activate the virtual environment. The following does this with a folder named "lime_test" in your home directory. Linux: mkdir -p ~/lime_test
cd ~/lime_test
python3 -m venv venv
source ~/lime_test/venv/bin/activate Windows: set "test=%HOMEDRIVE%%HOMEPATH%\lime_test"
mkdir "%test%"
cd "%test%"
C:/Full/Path/To/Your/Python3/python.exe -m venv venv
call "%test%"\venv\Scripts\activate" Next steps depend on whether you want to work on limesurveyrc2api itself, or just use it in some other project. Just using itTo just use it, install the package from GitHub, install the
Then make a silly script to check imports work OK. Create a file named "my_script.py" with the following contents: from limesurveyrc2api.limesurvey import LimeSurvey
api = LimeSurvey(url="nothing", username="nothing")
print(api)
print("yep OK") Then run it:
Should print out something like this:
Work on LSRC2APIIf you want to work on the project, you'll want to clone the repository then install the dependencies in one hit. Assuming you have
Alternatively, go to the project home page, click "Clone or download" then "Download zip". Unzip that file into your repo folder. This next step assumes your terminal session from earlier is still open, with the virtual environment still active. You can tell if it is, if the command prompt says "(venv)" at the start.
Then you can modify the project, add changes, etc. NoteIf you want to "deactivate" the virtual environment so that you can work on something else, just type "deactivate" and hit Enter. |
Thanks I will try these today. I installed by git clone your project then ran python3 setup.py install there are several recommendations that may help above I will let you know. I am migrating several Python scripts that grab data from Fluid surveys to use LimeSurvey as we are migrating off of fluid surveys... Very little documentations on the Lime survey API LOL Thanks so much for the quick response! |
Ok api = LimeSurvey(url="nothing", username="nothing") print(api) <limesurveyrc2api.limesurvey.LimeSurvey object at 0x10217a278> so off to trying to get the coding done HEHE do you know of a goo source of details on how the api calls work? thanks Don |
No problem. I'll close this one out but feel free to open another for other issues. For working with the API, check out the references linked in the readme which is everything I'm aware of. For working with this client library, each API function has a docstring describing the input arguments. For both, I don't think there's documentation of the data structures you'll get back from API calls, but if you'd like to add that in a PR it'd be welcome. |
I am working on getting the code worked out! I would gladly provide some code examples to add to the documentation! let me know if you would like me to provide details as i work them out :-) |
Activate survey
ImportError: No module named 'limesurveyrc2api.limesurvey
when I run the test from the test folder at
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/limesurveyrc2api/tests
config.ini is setup right yet I get nothing at all
dtruss results:
`dtruss python3 tests.py ▸▸▸▸▸▸▸▸▸▸
SYSCALL(args) = return
madvise(0x100298000, 0x3000, 0x5) = 0 0
open("/dev/dtracehelper\0", 0x2, 0x7FFF5FBFE3E0) = 3 0
ioctl(0x3, 0x80086804, 0x7FFF5FBFE368) = 0 0
close(0x3) = 0 0
thread_selfid(0x3, 0x80086804, 0x7FFF5FBFE368) = 1151900 0
bsdthread_register(0x7FFFBFD80080, 0x7FFFBFD80070, 0x2000) = 1073741919 0
ulock_wake(0x1, 0x7FFF5FBFD9BC, 0x0) = -1 Err#2
issetugid(0x1, 0x7FFF5FBFD9BC, 0x0) = 0 0
mprotect(0x100352000, 0x88, 0x1) = 0 0
mprotect(0x100354000, 0x1000, 0x0) = 0 0
mprotect(0x10036A000, 0x1000, 0x0) = 0 0
mprotect(0x10036B000, 0x1000, 0x0) = 0 0
mprotect(0x100381000, 0x1000, 0x0) = 0 0
mprotect(0x100382000, 0x1000, 0x1) = 0 0
mprotect(0x100352000, 0x88, 0x3) = 0 0
mprotect(0x100352000, 0x88, 0x1) = 0 0
getpid(0x100352000, 0x88, 0x1) = 29121 0
stat64("/AppleInternal/XBS/.isChrooted\0", 0x7FFF5FBFD878, 0x1) = -1 Err#2
stat64("/AppleInternal\0", 0x7FFF5FBFD910, 0x1) = -1 Err#2
csops(0x71C1, 0x7, 0x7FFF5FBFD3A0) = -1 Err#22
sysctl([CTL_KERN, 14, 1, 29121, 0, 0] (4), 0x7FFF5FBFD4F8, 0x7FFF5FBFD4F0, 0x0, 0x0) = 0 0
ulock_wake(0x1, 0x7FFF5FBFD920, 0x0) = -1 Err#2
csops(0x71C1, 0x7, 0x7FFF5FBFCC80) = -1 Err#22
getuid(0x71C1, 0x7, 0x7FFF5FBFCC80) = 868336049 0
getuid(0x71C1, 0x7, 0x7FFF5FBFCC80) = 868336049 0
stat64("/\0", 0x7FFF5FBFD8C0, 0x7FFF5FBFCC80) = 0 0
getattrlist("/Library\0", 0x7FFFBFC24B04, 0x7FFF5FBFF1D0) = 0 0
getattrlist("/Library/Frameworks\0", 0x7FFFBFC24B04, 0x7FFF5FBFF1D0) = 0 0
getattrlist("/Library/Frameworks/Python.framework\0", 0x7FFFBFC24B04, 0x7FFF5FBFF1D0) = 0 0
getattrlist("/Library/Frameworks/Python.framework/Versions\0", 0x7FFFBFC24B04, 0x7FFF5FBFF1D0) = 0 0
getattrlist("/Library/Frameworks/Python.framework/Versions/3.5\0", 0x7FFFBFC24B04, 0x7FFF5FBFF1D0) = 0 0
getattrlist("/Library/Frameworks/Python.framework/Versions/3.5/bin\0", 0x7FFFBFC24B04, 0x7FFF5FBFF1D0) = 0 0`
any idea what might be going on?
to be honest I am new to Lime and Lime API's and would appreciate any guidance :-)
The text was updated successfully, but these errors were encountered: