SyntaxError: invalid syntax
See original GitHub issueI have Python 2.7.6 running on a (somewhat) fresh install of ubuntu 14.04
$ ./letsencrypt.sh -c -d mydomain.com -t dns-01 -k 'hooks/cloudflare/hook.py'
#
# !! WARNING !! No main config file found, using default config!
#
+ Generating account key...
+ Registering account key with letsencrypt...
Processing mydomain.com
+ Signing domains...
+ Creating new directory /home/user/letsencrypt.sh/certs/mydomain.com ...
+ Generating private key...
+ Generating signing request...
+ Requesting challenge for mydomain.com...
Traceback (most recent call last):
File "hooks/cloudflare/hook.py", line 14, in <module>
import dns.resolver
File "/usr/local/lib/python2.7/dist-packages/dns/resolver.py", line 35, in <module>
import dns.message
File "/usr/local/lib/python2.7/dist-packages/dns/message.py", line 191
print('id %d' % self.id, file=s)
^
SyntaxError: invalid syntax
These are the steps I took before this error occurred:
$ git clone https://github.com/lukas2511/letsencrypt.sh
$ cd letsencrypt.sh
$ mkdir hooks
$ git clone https://github.com/kappataumu/letsencrypt-cloudflare-hook hooks/cloudflare
$ pip install -r hooks/cloudflare/requirements-python-2.txt
$ export CF_EMAIL='myemail@mydomain.com'
$ export CF_KEY='cloudflare_certificates_api_key'
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Invalid Syntax in Python: Common Reasons for SyntaxError
The interpreter will find any invalid syntax in Python during this first stage of program execution, also known as the parsing stage. If...
Read more >How to Fix Invalid SyntaxError in Python - Rollbar
The Python SyntaxError occurs when the interpreter encounters invalid syntax in code. When Python code is executed, the interpreter parses ...
Read more >python - Why do I get the syntax error "SyntaxError: invalid ...
When an error is reported on a line that appears correct, try removing (or commenting out) the line where the error appears to...
Read more >SyntaxError: invalid syntax - Python Morsels
Python's "invalid syntax" error message comes up often, especially when you're first learning Python. What usually causes this error and how can you...
Read more >SyntaxError in Python: How to Handle Invalid Syntax in Python
In this tutorial, I will teach you how to handle SyntaxError in Python, including numerous strategies for handling invalid syntax in Python.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Actually after installing
dnspython
and running this:Things seem to work. I did not uninstall
dnspython3
Great, it seems you now have the packages you were missing in your previous
pip list
. Try runningpip uninstall dnspython3
and then executingletsencrypt.sh
again. Post any errors.