Skip to content
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

Problem when loading files. #39

Open
ericywon opened this issue Sep 15, 2018 · 12 comments
Open

Problem when loading files. #39

ericywon opened this issue Sep 15, 2018 · 12 comments

Comments

@ericywon
Copy link

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",
1

then in Admin Task, I choose "Load Document"
2

But it is failed and the detail is below
3

Could you please help me to see where is the problem from?

Many thanks!

@ghost
Copy link

ghost commented Sep 15, 2018

Same problem for me and also mentioned in #38 (comment).

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.

@ericywon
Copy link
Author

My understanding is the wrong source path setting. Maybe in container, it is needed to set in different way.

@harshsuri
Copy link

@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.

@rjendoubi
Copy link

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!

@legumbot
Copy link

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.

image

@ericywon
Copy link
Author

submit a pull request

Thanks a lot! Could you submit a pull request to fix it?

@rjendoubi
Copy link

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?

@ericywon
Copy link
Author

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

@rjendoubi
Copy link

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?

@ericywon
Copy link
Author

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.

@talalzahid91
Copy link

@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.

@talalzahid91
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants