acidjunk / acidjunk/fortigate-config-parser
configparser issue in Python2 and Python3
- Ngôn ngữ chính
- Python
- Star
- 23
- Fork
- 9
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Hi,
I am facing issues in using this parser in both python 2 & 3.
In python2, I am having issues in installing `configparser` module.
```sh
E:\anand\py> .\Miniconda2\python.exe .\Miniconda2\pkgs\configparser-3.5.0.tar\dist\configparser-3.5.0\setup.py install
error in configparser setup command: Distribution contains no modules or packages for namespace package 'backports'
```
In python3, I am having issues in using `configparser` module. This issue is common in both Windows and Linux.
```py
>>> from configparser import ConfigParser
>>> with open(r'E:\anand\fg_master\tests\unit_tests\fortigate_parser\config_examples\example.conf','r') as f:
... config = f.read()
...
>>> fortigate = ConfigParser(config)
Traceback (most recent call last):
File "", line 1, in
File "E:\anand\py\Miniconda3\lib\configparser.py", line 614, in __init__
for key, value in defaults.items():
AttributeError: 'str' object has no attribute 'items'
```
My skills are insufficient to find a fix for this. I tried to google a lot but couldn't find a solution that I could understand and implement.
Please help. Thank you.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.