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

Erro ao extrair arquivos #53

Open
fabianosanttana opened this issue Aug 9, 2021 · 1 comment
Open

Erro ao extrair arquivos #53

fabianosanttana opened this issue Aug 9, 2021 · 1 comment

Comments

@fabianosanttana
Copy link

Opa, não sei se fiz algo errado, mas está dando esse erro, estou executando e,

Estou executando em macOS 11.5 (20G71)
PS /Users/fabianosilva/Desktop/socios-brasil> python --version Python 2.7.16

Extracting data/download/DADOS_ABERTOS_CNPJ_01.zip: 0it [00:00, ?it/s] Traceback (most recent call last): File "extract_dump.py", line 369, in <module> main() File "extract_dump.py", line 364, in main censorship=censorship, File "extract_dump.py", line 297, in extract_files output_writers[row_type].writerow(row) File "/Users/fabianosilva/Library/Python/2.7/lib/python/site-packages/rows/utils.py", line 618, in writerow self.writer = csv.DictWriter(self.fobj, fieldnames=list(row.keys())) File "/Users/fabianosilva/Library/Python/2.7/lib/python/site-packages/rows/utils.py", line 611, in fobj self.filename_or_fobj, mode="w", encoding=self.encoding File "/Users/fabianosilva/Library/Python/2.7/lib/python/site-packages/rows/utils.py", line 464, in open_compressed fobj = gzip.GzipFile(filename, mode=mode) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gzip.py", line 94, in __init__ fileobj = self.myfileobj = __builtin__.open(filename, mode or 'rb') TypeError: coercing to Unicode: need string or buffer, PosixPath found PS /Users/fabianosilva/Desktop/socios-brasil>

@fabianosanttana fabianosanttana changed the title Erro ai extrair arquivos Erro ao extrair arquivos Aug 9, 2021
@guigomesa
Copy link

Esse erro pode estar ligado a versão do Python, o script depende de libs do python 3.7.

Tente rodar nessa versão pode ser que resolva

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

2 participants