Danamir / dyn-gandi

Use Gandi LiveDNS API to update DNS records with a dynamic IP.
GNU General Public License v3.0
70 stars 18 forks source link

install dyn-gandi #3

Closed elmp51 closed 5 years ago

elmp51 commented 5 years ago

Hello,

Sorry I'm very basic in Python. I install your program in my server, and I log this log: running install running bdist_egg running egg_info writing requirements to dyn_gandi.egg-info/requires.txt writing dyn_gandi.egg-info/PKG-INFO writing top-level names to dyn_gandi.egg-info/top_level.txt writing dependency_links to dyn_gandi.egg-info/dependency_links.txt writing entry points to dyn_gandi.egg-info/entry_points.txt reading manifest file 'dyn_gandi.egg-info/SOURCES.txt' writing manifest file 'dyn_gandi.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib warning: install_lib: 'build/lib' does not exist -- no Python modules to install

creating build/bdist.linux-x86_64/egg creating build/bdist.linux-x86_64/egg/EGG-INFO copying dyn_gandi.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying dyn_gandi.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying dyn_gandi.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying dyn_gandi.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying dyn_gandi.egg-info/not-zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO copying dyn_gandi.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying dyn_gandi.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO creating 'dist/dyn_gandi-1.0-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing dyn_gandi-1.0-py2.7.egg removing '/usr/lib/python2.7/site-packages/dyn_gandi-1.0-py2.7.egg' (and everything under it) creating /usr/lib/python2.7/site-packages/dyn_gandi-1.0-py2.7.egg Extracting dyn_gandi-1.0-py2.7.egg to /usr/lib/python2.7/site-packages dyn-gandi 1.0 is already the active version in easy-install.pth Installing dyn_gandi script to /usr/bin

Installed /usr/lib/python2.7/site-packages/dyn_gandi-1.0-py2.7.egg Processing dependencies for dyn-gandi==1.0 Searching for requests==2.10.0 Best match: requests 2.10.0 Adding requests 2.10.0 to easy-install.pth file

Using /usr/local/lib/python2.7/site-packages Searching for docopt==0.6.2 Best match: docopt 0.6.2 Processing docopt-0.6.2-py2.7.egg docopt 0.6.2 is already the active version in easy-install.pth

Using /usr/lib/python2.7/site-packages/docopt-0.6.2-py2.7.egg Finished processing dependencies for dyn-gandi==1.0

then when I processing dyn_gandi, I got "command not found".

Thanks,

Danamir commented 5 years ago

It's dyn_gandi, with an underscore. It is available only after launching python setup.py develop.

You can also replace it with python dyn_gandy.py if you wish.

elmp51 commented 5 years ago

ok sorry when I launch dyn_gandi, I got this: Traceback (most recent call last): File "/bin/dyn_gandi", line 9, in load_entry_point('dyn-gandi', 'console_scripts', 'dyn_gandi')() File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 542, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2570, in load_entry_point return ep.load() File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2230, in load return self.resolve() File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2236, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "/volume1/homes/Emmanuel71/dyn-gandi-master/dyn_gandi.py", line 245 print(" Warning: %s" % w, file=sys.stderr) ^ SyntaxError: invalid syntax

Danamir commented 5 years ago

You must have Python > 3.5 to install dyn-gandi. It is not compatible with your Python 2.7 installation.

elmp51 commented 5 years ago

Ok thanks, So I install Python 3.5.1 I remove all files and restarted from scratch. Now it's better I can run dyn_gandi, (maybe in your doc, add python setup.py develop after the install. But I got an error when running it in dry-run. LiveDNS error: The domain xxxx.xxxx does not exist. [ERROR] Could you precise what to put exactly in the config.ini file? I put the key under '' and my domain (under''). Do I have to put something else?

Thanks,

Danamir commented 5 years ago

If you read carefully the doc, it is already mentioned to use Python 3.x, and to run python setup.py develop to complete the install ...

No need for quotes in the ini file, copy the config.ini-dist with your key and domain name (without www).

whinette commented 5 years ago

To be fair, it is not wrotten in the latest readme.

Danamir commented 5 years ago

Am I the only one seeing :

Install :

$ python setup.py install
$ copy config.ini-dist config.ini
$ dyn_gandi --help

In https://github.com/Danamir/dyn-gandi/blob/master/README.md oO

whinette commented 5 years ago

I see that exactly, but not python3 setup.py develop. I had to run it to finish the setup, without it the module wasn't found @ import error

Danamir commented 5 years ago

Well it took me only two months to figure out that I wrote install instead of develop in the readme. 😅 That's corrected, sorry for the misunderstanding.