Skip to content

Conversation

@subssn21
Copy link

Fix Error: unsupported operand type(s) for -: 'str' and 'int'

Currently calls to this function give:
Error: unsupported operand type(s) for -: 'str' and 'int'
File "/Users/dramus/chartflow/node_modules/sst/support/python-runtime/runtime.py", line 101, in
result = handler(event, context)

 File "/Users/dramus/.virtualenvs/chartflow/lib/python3.13/site-packages/datadog_lambda/wrapper.py", line 239, in __call__
"""Executes when the wrapped function gets called"""

 File "/Users/dramus/.virtualenvs/chartflow/lib/python3.13/site-packages/ddtrace/contrib/internal/aws_lambda/patch.py", line 117, in __call__
self._before(args, kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^

 File "/Users/dramus/.virtualenvs/chartflow/lib/python3.13/site-packages/ddtrace/contrib/internal/aws_lambda/patch.py", line 145, in _before
self.timeoutChannel._start()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^

 File "/Users/dramus/.virtualenvs/chartflow/lib/python3.13/site-packages/ddtrace/contrib/internal/aws_lambda/patch.py", line 74, in _start
remaining_time_in_millis = self.context.get_remaining_time_in_millis()

 File "/Users/dramus/chartflow/node_modules/sst/support/python-runtime/runtime.py", line 38, in get_remaining_time_in_millis
return int(max(self.deadline_ms - int(round(time() * 1000)), 0))
               ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~

Fix Error: unsupported operand type(s) for -: 'str' and 'int'
@netlify
Copy link

netlify bot commented Mar 25, 2025

Deploy Preview for sst-docs canceled.

Name Link
🔨 Latest commit a93172f
🔍 Latest deploy log https://app.netlify.com/sites/sst-docs/deploys/67e2c8c4caea9f0008037608

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

Successfully merging this pull request may close these issues.

1 participant