Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update error #17

Closed
tib-kpl opened this issue Nov 15, 2018 · 4 comments
Closed

Update error #17

tib-kpl opened this issue Nov 15, 2018 · 4 comments

Comments

@tib-kpl
Copy link

tib-kpl commented Nov 15, 2018

Hello,

I've been using freenom-dns-updater for a while to update my ip in my dns and for some time I have this error when I did not have it before. Can you help me ?

Traceback (most recent call last):
File "fdu.py", line 318, in
cli()
File "/home/tib-kpl/.local/lib/python2.7/site-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/home/tib-kpl/.local/lib/python2.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/tib-kpl/.local/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/tib-kpl/.local/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/tib-kpl/.local/lib/python2.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/tib-kpl/.local/lib/python2.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "fdu.py", line 156, in record_update
ok_count, err_count = record_action(lambda freenom, rec: freenom.add_record(rec, True), config, False)
File "fdu.py", line 252, in record_action
action(freenom, rec)
File "fdu.py", line 156, in
ok_count, err_count = record_action(lambda freenom, rec: freenom.add_record(rec, True), config, False)
File "/usr/local/lib/python2.7/dist-packages/freenom_dns_updater/freenom.py", line 64, in add_record
return self.update_record(record, records=records)
File "/usr/local/lib/python2.7/dist-packages/freenom_dns_updater/freenom.py", line 115, in update_record
raise UpdateError([e.text for e in errs], record, records)
freenom_dns_updater.exception.update_error.UpdateError

@Gribnif
Copy link

Gribnif commented Nov 16, 2018

It looks like freenom changed the way their update process works a tiny bit. Now, if there is no change, an "error" with the text "There were no changes" is returned. The solution is to change the code around line 115 to:

        errs = soup.find_all(attrs={'class': 'dnserror'})
        if errs:
            for e in errs:
                if e.text != "There were no changes":
                    raise UpdateError(e.text, record, records)

There's probably a more elegant way to do this, but my Python skills aren't the greatest.

@tib-kpl
Copy link
Author

tib-kpl commented Nov 17, 2018

thank you so much

@tib-kpl tib-kpl closed this as completed Nov 17, 2018
@Gribnif
Copy link

Gribnif commented Nov 17, 2018

I am glad this worked for you. Please reopen this issue so that the program's author knows this problem exists and applies a permanent fix to the code. (I would do it, but apparently Github won't let me.)

@tib-kpl tib-kpl reopened this Nov 18, 2018
@maxisoft maxisoft mentioned this issue Aug 10, 2020
Merged
@maxisoft
Copy link
Owner

Should be fixed by #23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants