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

OverflowError #306

Closed
milcent opened this issue Feb 14, 2019 · 13 comments
Closed

OverflowError #306

milcent opened this issue Feb 14, 2019 · 13 comments

Comments

@milcent
Copy link

milcent commented Feb 14, 2019

Após instalar as dependências requeridas para-o pacote socios-brasil, ao tentar descompactar como indicado, obtenho o erro abaixo:

Traceback (most recent call last):
 File "extract_dump.py", line 27, in <module> 
    import rows
 File "C:\Users\milcent\AppData\Local\Continuum\Anaconda3\lib\site-packages\row s\__init__.py", line 22, in <module>
    import rows.plugins as plugins
 File "C:\Users\milcent\AppData\Local\Continuum\Anaconda3\lib\site-packages\row s\plugins\__init__.py", line 20, in <module>
    from . import plugin_csv as csv # NOQA
 File "C:\Users\milcent\AppData\Local\Continuum\Anaconda3\lib\site-packages\row s\plugins\plugin_csv.py", line 34, in <module>
    unicodecsv.field_size_limit(sys.maxsize) 
OverflowError: Python int too large to convert to C long

Rodando em Windows 7, Anaconda 64 bits, Python 3.6.
Grato,
Marcel Milcent

@Danielydsm
Copy link

Estou tendo este mesmo problema simplesmente por tentar importar a biblioteca:
import rows

Estou usando Windows Server 2012, Python 3.6

@turicas
Copy link
Owner

turicas commented Feb 21, 2019

@milcent e @Danielydsm vocês poderiam tentar trocar a linha unicodecsv.field_size_limit(sys.maxsize) para unicodecsv.field_size_limit(16777216) (no arquivo C:\Users\milcent\AppData\Local\Continuum\Anaconda3\lib\site-packages\row s\plugins\plugin_csv.py ou o equivalente da instalação) e testar novamente, por favor?

@turicas
Copy link
Owner

turicas commented Feb 21, 2019

@occoder please follow here.
Could you please try to change rows code (plugins/plugin_csv.py) to a fixed value (like 16777216) on unicodecsv.field_size_limit call?

@milcent
Copy link
Author

milcent commented Feb 21, 2019

Funcionou!
Está descompactando. Vou deixar aqui rodando, pois não sei quando termina (Rs)
Muito grato!

@Danielydsm
Copy link

Funcionou aqui também, muito obrigada.

@luxu
Copy link

luxu commented Mar 1, 2019

Aqui também, vlw @turicas

@mtmacedo
Copy link

mtmacedo commented Sep 6, 2019

Solução sugerida também funcionou bem comigo. Consegui importar a biblioteca com sucesso!

@tbmpereira
Copy link

tbmpereira commented Sep 10, 2019

eu alterei o arquivo plugin_csv.py e agora ao tentar importar rows apaece a seguinte mensagem:

File "C:\Users\mapereira\AppData\Local\Continuum\anaconda3\lib\site-packages\rows\plugins\sqlite.py", line 26, in <module>
    import rows.fields as fields
AttributeError: module 'rows' has no attribute 'fields'`

@elieobeid7
Copy link

elieobeid7 commented Aug 1, 2021

Please only speak English on Github or add a statement in the readme saying this is for Spanish speakers only, I don't understand a word you are saying and this is kinda a big deal when facing this issue, the library doesn't even work unless the fix highlighted by @turicas is applied, and the entire conversation about it in Spanish. This is unacceptable.

And @turicas, please apply this fix to master or merge the open pull request. this issue is 3 years old, how long should we wait for this fix to be applied? Or should I package my software with long documentation to the users on how to fix it? This is unacceptable.

Update

the library has a bug, if the excel header has capital letters and spaces like First Name, it will convert it to lower case and replace the space with an underscore first_name. This is so weird and it breaks my initial code!

In any case, I no longer need this library, I used this approach, I don't care if any of the bugs I reported get fixed or if you continue talking in Spanish, I'm out of here.

@turicas
Copy link
Owner

turicas commented Aug 2, 2021

Please only speak English on Github or add a statement in the readme saying this is for Spanish speakers only, I don't understand a word you are saying and this is kinda a big deal when facing this issue, the library doesn't even work unless the fix highlighted by @turicas is applied, and the entire conversation about it in Spanish. This is unacceptable.

Unacceptable is your comment. First of all, the language is PORTUGUESE, not Spanish. It's my mother language and the majority of the library users are Brazilian. Now do you make the laws GitHub users should follow? Seriously?

And @turicas, please apply this fix to master or merge the open pull request. this issue is 3 years old, how long should we wait for this fix to be applied? Or should I package my software with long documentation to the users on how to fix it? This is unacceptable.

You package your software the way you want, and you always have the right to not use the library, or even to fork it. I didn't promise I would maintain it the way YOU want, did I? Did you read the license?
Regarding to the fix: I do not use Windows and did not have time to test it the way I wanted. This is completely my fault and of course I could have done it better - I didn't, I'm sorry, I have lots of other stuff to do. But the fact that the situation is not ideal does not give you the right to come talk aggressively with everyone here. If the library has already helped you with something, you didn't come to thank me, right?
And just to make it clear: the fix was already commited in the develop branch, as can be seen on 8928cd8, but was not released on PyPI (for other reasons). You could just pip install -U https://github.com/turicas/rows/archive/develop.zip.

Update

the library has a bug, if the excel header has capital letters and spaces like First Name, it will convert it to lower case and replace the space with an underscore first_name. This is so weird and it breaks my initial code!

It is not a bug, it's a design decision. There are MANY use cases where I'd like to slugify the headers so we have normalized column names and then can import it into databases without the need to put every column name in quotes etc. In my opinion it's a good practice and as I implemented it, it's the way it is. Again: if you don't want the things this way, you can contribute to it, fork it or just don't use it. :)
Update: the issue #330 proposes it. Why didn't you just created a PR implementing instead of wasting our time with these comments?

In any case, I no longer need this library, I used this approach, I don't care if any of the bugs I reported get fixed or if you continue talking in Spanish, I'm out of here.

Good for you and for us! We don't need to waste our time supporting people like you, thanks for your decision.

Now your problem is solved and you are interested in natural language processing (@cltk), go learn more about other languages besides yours - Google Translate is your friend (it's free and could help you not making any shameful comments anymore)!
translate

@elieobeid7
Copy link

elieobeid7 commented Aug 2, 2021

@turicas I didn't want to leave a comment here, but I saw that if someone opens a similar issue you either don't reply to them or you just ask them to check this question

#348

#355

I respect your language, but you are forcing non-Portuguese speakers to translate 40 comments to see what's going on, no thank you. you are not willing to answer their issues, just close all duplicates, just close them.

And just to make it clear: the fix was already committed in the develop

How to know that? Should I have translated 40 comments to understand this?

Regarding the design decisions to replace the space with an underscore and lowercase the string. why isn't this mentioned in the documentation or the readme? Or should we just let someone download the library, break the project and deal with it?

Update: issue #330 proposes it. Why didn't you just created a PR implementation instead of wasting our time with these comments?

Do you think your library is so important for me to do a PR? first of all you don't have a good history of merging PRs, secondly, this snippet does everything your library does, at least for me, without breaking anything, it would have taken me hours to read the library source code, plus your library uses openpyxl anyway, so I guess it's just some wrapper.

@turicas
Copy link
Owner

turicas commented Aug 2, 2021

And just to make it clear: the fix was already committed in the develop

How to know that? Should I have translated 40 comments to understand this?

You just read the issue history (why it was closed) - it's on the GitHub default language:

fix

The commit is linked there, just read its message (it's in English, BTW).

Regarding the design decisions to replace the space with an underscore and lowercase the string. why isn't this mentioned in the documentation or the readme? Or should we just let someone download the library, break the project and deal with it?

You are right about it - the docs should mention this feature. I created the issue #361 so I can manage the fix in the future. PRs welcome. :)

@JoaoFelipe
Copy link

I respect your language, but you are forcing non-Portuguese speakers to translate 40 comments to see what's going on, no thank you. you are not willing to answer their issues, just close all duplicates, just close them.

This issue has less than 10 comments in Portuguese, but let me help you with the translation:

Step 1: Open google translate: https://translate.google.com/
Step 2: Paste the issue URL there (you don't need to specify the language)
Step 3: Click on the link on the translation box: https://translate.google.com/translate?sl=auto&tl=en&u=https://github.com/turicas/rows/issues/306
Pronto!

Now you can read everything in English and stop complaining about it.

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

No branches or pull requests

8 participants