Python Forum
Problems with "re.fullmatch"
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems with "re.fullmatch"
#5
Hi @micseydel! Sorry if I didn't explain well and sorry for my ignorance.
I don't know how I can change the file name and I don't know if I should do that because the error is still, when running it in the terminal.

The second code that I wrote is the menu and the use of the functions/methods of the first code. In that code I don't have any mistakes. The important mistake is:

File "USO_BIBLIOTECA.py", line 4, in <module>
from BIBLIOTECA import *
File BIBLIOTECA.py line 134, in <module>
comic = Comic()
File BIBLIOTECA.py line 128, in __init__
libro.setAutor(self)
File BIBLIOTECA.py line 67, in setAutor
if re.fullmatch(regex, new_autor):
File BIBLIOTECA.py line 168, in fullmatch
return _compile(pattern, flags).fullmatch(string)
TypeError: expected string or bytes-like object.

BIBLIOTECA.py is the first code and USO_BIBLIOTECA.py is the second.

In relation to all the code that I have published, I will consider your advice for future publications.I am learning to simplify code

I'm trying to explain it to you as best I can. Thanks for your understanding
Reply


Messages In This Thread
Problems with "re.fullmatch" - by AlanT - May-16-2019, 07:18 PM
RE: Problems with "re.fullmatch" - by micseydel - May-16-2019, 07:30 PM
RE: Problems with "re.fullmatch" - by AlanT - May-16-2019, 08:49 PM
RE: Problems with "re.fullmatch" - by micseydel - May-16-2019, 10:34 PM
RE: Problems with "re.fullmatch" - by AlanT - May-17-2019, 12:42 PM
RE: Problems with "re.fullmatch" - by micseydel - May-17-2019, 09:11 PM
RE: Problems with "re.fullmatch" - by AlanT - May-17-2019, 10:59 PM
RE: Problems with "re.fullmatch" - by micseydel - May-17-2019, 11:02 PM
RE: Problems with "re.fullmatch" - by AlanT - May-18-2019, 04:45 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020