This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: AttributeError: 'list' object has no attribute 'find'
Type: Stage: resolved
Components: Versions: Python 3.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: AlexWaygood, eric.araujo, krisp1506, lys.nikolaou, pablogsal
Priority: normal Keywords:

Created on 2021-11-03 07:49 by krisp1506, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (3)
msg405584 - (view) Author: Kishor Pawar (krisp1506) Date: 2021-11-03 07:49
```
Traceback (most recent call last):
  File "gpgcheck.py", line 33, in <module>
    if config.get(repoName, 'gpgcheck', fallback='1') != "1":
  File "/usr/lib64/python3.6/configparser.py", line 802, in get
    d)
  File "/usr/lib64/python3.6/configparser.py", line 394, in before_get
    self._interpolate_some(parser, option, L, value, section, defaults, 1)
  File "/usr/lib64/python3.6/configparser.py", line 413, in _interpolate_some
    p = rest.find("%")
AttributeError: 'list' object has no attribute 'find'
```


I checked all the calls made to `_interpolate_some`, and each call seems to pass the `list` type argument in the 4th position, but then function calling a `find` method on that 4th `list` type argument.  Which is causing above error.
msg405585 - (view) Author: Alex Waygood (AlexWaygood) * (Python triager) Date: 2021-11-03 08:11
Hi! It's very hard to work out what the problem might be here if you don't show us the code that caused the error. Also, this site is for reporting bugs in the Python programming language itself, and this doesn't look like a bug in Python to me. You might be better off posting this question on Discuss (https://discuss.python.org/c/users/7), reddit, or StackOverflow.

Having said all that, it looks like you're passing in a list where a string is expected — `list` objects don't have a `find` method (https://docs.python.org/3/tutorial/datastructures.html), but `str` objects do (https://docs.python.org/3/library/stdtypes.html#str.find).

Good luck solving your problem :)
msg405817 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2021-11-05 18:38
Also note that Python 3.6 only receives security updates now.  Does your problem still happen with a current version?
History
Date User Action Args
2022-04-11 14:59:52adminsetgithub: 89862
2021-11-06 01:23:46terry.reedysetstatus: pending -> closed
resolution: not a bug
stage: resolved
2021-11-05 18:38:11eric.araujosetstatus: open -> pending

nosy: + eric.araujo
messages: + msg405817

components: - Parser
type: behavior ->
2021-11-03 08:11:18AlexWaygoodsettype: crash -> behavior

messages: + msg405585
nosy: + AlexWaygood
2021-11-03 07:49:03krisp1506create