lexpredict-contraxsuite
lexpredict-contraxsuite copied to clipboard
Problem when loading files.
Hi, I have successfully install the contraxsuite by using docker. But when I face a problem when I load the document. I first upload a file to a folder "test",

then in Admin Task, I choose "Load Document"

But it is failed and the detail is below

Could you please help me to see where is the problem from?
Many thanks!
Same problem for me and also mentioned in https://github.com/LexPredict/lexpredict-contraxsuite/issues/38#issuecomment-421458380.
Just for my curiosity, has anyone ever managed to make the platform work? I could not find any evidence of a fully functional version only based on the 'open source' code.
My understanding is the wrong source path setting. Maybe in container, it is needed to set in different way.
@ggndtes No, I have not been successful yet, but I have not spent any time on it since the last issue of file upload as it does not help me understand the capabilities. Planning to dig into library but there is not much of documentation except for a publication examples.
Hi @ericywon. After some reading, thinking and poking about in files, I think the crucial part of your error log is where it says KeyError: 'source_data'. Hopefully we can fix that!
I presume you're on version 1.1.3. Can you please try opening the file contraxsuite_services/apps/tasks/tasks.py in a text editor, go to line 423, and replace:
path = kwargs['source_data']
with:
path = kwargs['source_path']
Then restart the application and see if it now works. If it does, I will submit a pull request to fix this problem for everyone :)
Thanks!
Actually the same issue happen to loading of dictionary, list of courts in this case. I noticed that the path to an upload file has been incorrectly parsed as "/data/media/data/documents" when it should be "/media/data/documents" according to File Browser. Inside the code I think it has to do with the variable MEDIA_ROOT but I am reluctant in touching the source code without first seeking some guidance from the author. Can someone from LexPredict please help? Thanks.

submit a pull request
Thanks a lot! Could you submit a pull request to fix it?
Hi @ericywon, did that fix the problem? If so then sure, happy to put in a PR referencing this issue :) Also @ericlex if there's a good example you could refer me to somewhere in the repo of the kind of unit test that'd be appropriate for this kind of functionality, happy to have a go at that as well?
Hi @ericywon, did that fix the problem? If so then sure, happy to put in a PR referencing this issue :) Also @ericlex if there's a good example you could refer me to somewhere in the repo of the kind of unit test that'd be appropriate for this kind of functionality, happy to have a go at that as well?
Hi rjendoubi,
I was trying these days to change the tasks.py file in Docker container, but I still can not do so. I try to restart the container and commit the container to a image and run that. But still does not successfully change the content. So I am wondering whether it is possible to update the files through Docker directly.
Sorry for that I am new to Docker.
Best,
Ye
Hi @ericywon, sorry I haven't used docker at all yet - I've been trying with the fabric-based setup - but from what I've heard about docker before it wouldn't surprise me if docker images were designed to be static, i.e. the code can't be changed. Unfortunately I haven't got far enough with my own research to know how to generate a new docker container. I'll let you know if I can figure out something which may be helpful for you. Are you working on a Linux host or does docker run on Windows too?
Hi @ericywon, sorry I haven't used docker at all yet - I've been trying with the fabric-based setup - but from what I've heard about docker before it wouldn't surprise me if docker images were designed to be static, i.e. the code can't be changed. Unfortunately I haven't got far enough with my own research to know how to generate a new docker container. I'll let you know if I can figure out something which may be helpful for you. Are you working on a Linux host or does docker run on Windows too?
Thanks a lot! This is a great software, so I wish I could use it soon.
I am now using Ubuntu to run the docker.
@ericywon @rjendoubi @legumbot @ggndtes I used the latest commit and tried the docker approach. I am still not able to upload the documents. After running the admin tasks, it says it failed but does not show any logs. Any help would be appreciated.
I was able to resolve the issues. Can any explain how to train the model and extract terms or the uses cases of this product. Any help would be really appreciated. @ericywon @rjendoubi @legumbot @ggndtes