Erro de permissão
leticiafatima opened this issue · 1 comments
leticiafatima commented
olá, estou tentando rodar a linha
python3 cnpj.py "E:\Leticia\Documents\DADOS_ABERTOS_CNPJ\F.K032001K.D81106D" csv "E:\Leticia\Documents\DADOS_ABERTOS_CNPJ"
Porem, fica me dando esse erro:
Traceback (most recent call last):
File "cnpj.py", line 258, in <module>
main()
File "cnpj.py", line 255, in main
cnpj_full(input_path, tipo_output, output_path)
File "cnpj.py", line 154, in cnpj_full
chunksize=CHUNKSIZE)
File "E:\Leticia\Documents\projetos\CNPJ-full\CNPJ-full\cfwf.py", line 46, in read_cfwf
nrows=nrows)
File "E:\Program Files\Python37\lib\site-packages\pandas\io\parsers.py", line 803, in read_fwf
return _read(filepath_or_buffer, kwds)
File "E:\Program Files\Python37\lib\site-packages\pandas\io\parsers.py", line 429, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
File "E:\Program Files\Python37\lib\site-packages\pandas\io\parsers.py", line 895, in __init__
self._make_engine(self.engine)
File "E:\Program Files\Python37\lib\site-packages\pandas\io\parsers.py", line 1132, in _make_engine
self._engine = klass(self.f, **self.options)
File "E:\Program Files\Python37\lib\site-packages\pandas\io\parsers.py", line 3605, in __init__
PythonParser.__init__(self, f, **kwds)
File "E:\Program Files\Python37\lib\site-packages\pandas\io\parsers.py", line 2225, in __init__
memory_map=self.memory_map)
File "E:\Program Files\Python37\lib\site-packages\pandas\io\common.py", line 427, in _get_handle
f = open(path_or_buf, mode, errors='replace', newline="")
PermissionError: [Errno 13] Permission denied: 'E:\\Leticia\\Documents\\DADOS_ABERTOS_CNPJ\\F.K032001K.D81106D'
Estou rodando com o PowerShell em modo admin. Poderia me dar uma ajuda sobre o que está acontecendo?
leticiafatima commented
Já encontrei o que estava de errado.
Eu não tava abrindo o arquivo, mas sim a pasta aonde estava o arquivo. Alterei a linha para:
python3 cnpj.py "E:\Leticia\Documents\DADOS_ABERTOS_CNPJ\F.K032001K.D81106D\F.K032001K.D81106D.txt" csv "E:\Leticia\Documents\DADOS_ABE
RTOS_CNPJ"