Sep-04-2023, 06:45 PM
(This post was last modified: Sep-04-2023, 07:35 PM by deanhystad.)
The data comes from Cinemagoer, an IMDB scraper package. Lunacy probably should have posted this question in the original thread instead of starting a new one and losing all the context.
https://python-forum.io/thread-40667.html
'year' must not be a key in movie. You should print out all the keys in movie to find out what they are.
There is no need for the global declaration. You only need to declare a variable name as global if you assign a value to the name. In get_data_actor_name() there are no assignments made to cg, and movie_name is obviously a local variable because it is cleared at the end of the function.
Posted code should be runable. This means including imports and any setup code.
https://python-forum.io/thread-40667.html
'year' must not be a key in movie. You should print out all the keys in movie to find out what they are.
There is no need for the global declaration. You only need to declare a variable name as global if you assign a value to the name. In get_data_actor_name() there are no assignments made to cg, and movie_name is obviously a local variable because it is cleared at the end of the function.
Posted code should be runable. This means including imports and any setup code.