un-lock-able / win-acme-dns-validation-aliyun

A python script for the "dns validation" in the process of getting a SSL certificate from Let's Encrypt.
GNU General Public License v3.0
0 stars 0 forks source link

Script error: FileNotFoundError: [Errno 2] No such file or directory: '{install_directory}\\../../python/renewSSLScript/settings.json' #1

Closed L0891-3BDBFF closed 6 months ago

L0891-3BDBFF commented 6 months ago

Script error: Traceback (most recent call last): Script error: File "renewSSL.py", line 64, in Script error: File "renewSSL.py", line 51, in main Script error: FileNotFoundError: [Errno 2] No such file or directory: '{install_directory}\../../python/renewSSLScript/settings.json' Script error: [45812] Failed to execute script 'renewSSL' due to unhandled exception! Script finished with exit code 1

I used the packed exe version, and I do what README says, but the script can't run

un-lock-able commented 6 months ago

I'm sorry to know that, but since now I am not using Aliyun as my DNS provider anymore so I'm not sure what happened to this script. However, I think this issue may be caused by the packing application used to pack the python script into the excutable exe. I wonder if it is possible for you to try excuting the script with python interpreter directly and see if the problem persists?

L0891-3BDBFF commented 6 months ago

I'm sorry to know that, but since now I am not using Aliyun as my DNS provider anymore so I'm not sure what happened to this script. However, I think this issue may be caused by the packing application used to pack the python script into the excutable exe. I wonder if it is possible for you to try excuting the script with python interpreter directly and see if the problem persists?

I try to run the python script from command line and it throw this:

E:\acme\aliyun\py>python renewSSL.py Traceback (most recent call last): File "renewSSL.py", line 5, in from aliyunsdkalidns.request.v20150109.AddDomainRecordRequest import AddDomainRecordRequest ModuleNotFoundError: No module named 'aliyunsdkalidns'

is something missing?(I have installed Aliyun python SDK)

un-lock-able commented 6 months ago

ModuleNotFoundError: No module named 'aliyunsdkalidns'

is something missing?(I have installed Aliyun python SDK)

From my memory, to use the dns part of the aliyun api, you have to install the aliyun-python-sdk-alidns package alongside with the aliyun-python-sdk-core.

Try cheking your installed package by

pip list

to check if you have installed both.

If not, try install them by

pip install aliyun-python-sdk-core aliyun-python-sdk-alidns==3.0.7

and run the script again to see if it works?

I have also added a requirement.txt file in ec68873. You may also try to install these packages using

pip install -r requirements.txt

when you are in the project directory. Again I'm sorry that since I'm no longer hosting my DNS on aliyun, I did not test whether this will fix the problem.