Closed KKS161994 closed 7 years ago
Hi,
Are you sure you are using Python3 ?
Hello,
I have this same error if I launch python-sitemap with python 2.x.
sebclick ~/Python/python-sitemap $ python main.py
Traceback (most recent call last):
File "main.py", line 6, in <module>
import crawler
File "/home/sebclick/Python/python-sitemap/crawler.py", line 85
print(config.xml_header, file=self.output_file)
^
SyntaxError: invalid syntax
sebclick ~/Python/python-sitemap $
sebclick ~/Python/python-sitemap $
sebclick ~/Python/python-sitemap $ python --version
Python 2.7.12
sebclick ~/Python/python-sitemap $
It's ok with python 3.x :
sebclick ~/Python/python-sitemap $ python3 main.py --help
usage: main.py [-h] [--skipext SKIPEXT] [--parserobots] [--debug] [-v]
[--output OUTPUT] [--exclude EXCLUDE] [--drop DROP] [--report]
[--config CONFIG | --domain DOMAIN]
Crawler pour la creation de site map
Hi.
Thanks sebclick. KKS161994 can you check if you are using python3?
On running command mentioned in simple usage of readme.md ........ File "main.py", line 6, in
import crawler
File "/Users/kartikey/Desktop/SoftwareIncubator/sitemapgen/python-sitemap/crawler.py", line 85
print(config.xml_header, file=self.output_file)