-
Notifications
You must be signed in to change notification settings - Fork 114
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
pandas.errors.ParserError: Error tokenizing data. C error: Expected 1 fields in line 4, saw 2 #83
Comments
How many gene groups are you querying? You got this problem because this line of code:
I don't know what happens. But I suggest the reason is network latency. gseapy wait for a long time |
Yeah, for some groups I have a few hundreds, but I ended up not saving any group because it constantly changes. I will try to run again and see for which groups it stops this time. Now that you talk about it, sometimes gseapy was failing because of a connection reset exception, and I solved this by just adding a few milliseconds of sleep before calling |
@zqfang I was going to create a new issue, but I'm now receiving another error in an inconsistent way (a bit like the error in this issue). Do you think it might be related to this?
|
I think the problems you’ve had are for the same reason: the Enrichr server could not handle gseapy’s high concurrent requests from same IP address in a short time. It seems that user will be blocked to prevent API abuse. So, when you try to get the data back, you will get nothing. I have no other way to improve this, except adding sleep after each querying. Do you have any ideas? |
I see, thanks for the help anyway! I'd say if you have a timeout from the Enrichr server, or some error in the returning answer from Enrichr, maybe just catch that and show to the user that the problem is with the Enrichr server (and maybe suggest wait a bit or reduce the number of requests). Otherwise all these errors will surely just bring confusion when the problem is actually simple, as you pointed out. |
I am also getting the same error that @tjiagoM posted above executing the following on a list of about 50 genes:
I updated to the latest release and am still getting this issue, is there still a problem with the server that is causing this? |
I have waited a week and I am still getting the same error?
Any insight into why this may be happening? |
@tsnetterfield , Sorry for replying late. could you please install the lastest PR and try again? I've update the data that pandas read. Hope this will fix the problem you have |
@zqfang Thanks for getting back to me! I updated my Python to 3.7.4 and am still getting the same error I posted above. |
@tsnetterfield , Please install the lastest gseapy using the this line of code:
make sure that you are using v0.9.16 |
@zqfang When I do this in Anaconda Prompt this is the first line that comes up:
Anaconda seems to only see the 0.9.15 development version for some reason. |
You cannot install the same package with different version twice. Uninstall old one first.
…Sent from my iPhone
On Sep 29, 2019, at 10:17 AM, tsnetterfield ***@***.***> wrote:
@zqfang When I do this in Anaconda Prompt this is the first line that comes up:
Requirement already satisfied: gseapy from git+git://github.com/zqfang/gseapy.git#egg=gseapy in c:\users\tatiana\anaconda3\lib\site-packages (0.9.15)
Anaconda seems to only see the 0.9.15 development version for some reason.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@armadillocommander thanks for the tip! I uninstalled and now have version 0.9.16. However, I am still getting the exact same parser error from above. |
@tsnetterfield , do you mind share me with your gene list input? I can't reproduce your bug |
Hi @zqfang, attached is the list I was trying to run. I tried a different list just now and got the same error. |
@tsnetterfield , sorry for replying late. I was on vacation. However, I still could not reproduce the error you've got using the same code:
Even I run the code for 50 times, it did not break. |
close now. this issue should be gone now |
Alternately, you can save the file as CSV UTF-8 (Comma delimited) |
I had the same error I arranged regularizing the data in csv file. |
Hello,
I have to run multiple enrichments, over different groups of genes, so I just have a big for loop which goes over all these group of genes, and for each one just runs:
Once in a while I have this error:
I'm having a huge difficulty to isolate the error because this doesn't happen always for the same group of genes. Could anyone give an hint about what the problem could be, as I've started using gseapy only very recently?
If I cannot find the source of error I guess it's fine because I've been able to run for all the groups by just repeating the code... Which is quite annoying as I don't know whether some enrichment might be wrong. What could I be missing here?
The text was updated successfully, but these errors were encountered: