dgtlmoon / dgtlmoon/changedetection.io

Type error when SSL parameter passed with no port parameter

Open
#2,192 0 comments 0 reactions 1 assignee Claimed by @dgtlmoon View on GitHub
triage
Dominant language
Python
Stars
34.1k
Forks
2k
Avg merge
7h 37m
Merged PRs (30d)
59

Description

**Describe the bug**
I have modified my docker-compose file by adding the following:

```
command: python ./changedetection.py -d /datastore -s
```

This caused the following python error:

```
Traceback (most recent call last):
File "/app/./changedetection.py", line 6, in
changedetectionio.main()
File "/app/changedetectionio/__init__.py", line 187, in main
eventlet.wsgi.server(eventlet.wrap_ssl(eventlet.listen((host, port), s_type),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/eventlet/convenience.py", line 78, in listen
sock.bind(addr)
TypeError: 'str' object cannot be interpreted as an integerwhen SSL is enabled on the command line (Docker).
```

I noticed the else statement (for when ssl is not enabled) casts the port variable to int. If I add `-p 5000` to the command section, the program runs in the docker container.

**Version**
v0.45.13

**To Reproduce**
Modify docker-compose file and add the following to the changedetection service.
```
command: python ./changedetection.py -d /datastore -s
```
The run `docker-compose up`.

**Additional context**
I have mapped the following:
```
volumes:
- /ssl/cert.pem:/app/cert.pem
- /ssl/privkey.pem:/app/privkey.pem
...
```
This presents the correct certificate.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.