-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
producer and recommendations sometimes gives error #86
Comments
Add better logging to your application so you can see which titles are making it error. I'd like a film without producers for the first one ... the second one must be a film without a year .. an example of that would be nice too |
I'll try to find the movie that gives the trouble. But i don't understand why you alterred the method directors, while this issue is about producers? |
I found one movie that gives the error on producer method! http://www.imdb.com/title/tt0149937/ |
The problem was that get_table_rows was returning a false if there were no rows in the table, which meant producers was erroring when it tried to loop on it. I changed directors because it was a disgusting function with multiple coding errors (it only didn't loop on false because count(false) happens to return 0 and not an error, it checked for get_table_rows returning false by comparing its return to null with == ...etc) I probably should've learnt my lesson about totally refactoring a function after causing this bug but the more this stuff gets refactored into sensible code the less likely I'll mess up in the future |
Thanks for your explanation! I'm trying to reproduce the error on movie recommendations but i can't find it anymore. There is however a strange thing going on with the recommendations at imdb's site. A few examples: |
@tboothman And i think that the method has to be re done because of the use of the same variable name...(my bad, sorry) |
I found a few others too: http://www.imdb.com/title/tt0878652/ It turns out that if there is no year available, there isn't a span with class="nobr". this will always result in a error in this method.. My apologies for making a little bit of a mess of this method.. i thought it worked fine but apparently not. |
I have made a attempt to alter this method..
But it's not complete yet, the year pair is not captured though |
There is more wrong with my above attempt.. http://www.imdb.com/title/tt0450385/ |
Next try..
|
Oke finally something that's actually working! It's not using dom or xpath, couldn't get it working... It will capture the following year appearances: Single Year, Year span (xxxx-xxxx), or empty if no Year available. It strips out any characters other than the year digits. It feels like it's faster than dom/ xpath but i'm not sure
|
@tboothman Maybe it slipt your mind haha |
Okay... i understand that this has no priority or any interest but maybe someone can help me a little bit. I made a attempt to extend the recommendations method with rating and plotoutline, this works well but as you can see in the code it isn't very efficient or nicely programmed probably because.. yep lack of skills i know So my question is am i on the right track here?
Thanks |
I have a function in my program to update all movies through this library.
If i use that function sometimes it gives below errors and breaks executing the script because the max execution time is exceeded.
Sometimes this gives invalid argument foreach in the method producer at line 1521 in title.php
The same happens for movie recommendations, but than undefined index at line 524 and 526 in title.php
Those errors are both in the same update all run
It never happens to any of the other methods, only those two
The strange thing is that if i update a single movie there is nothing wrong..
I can't pin point where this problem may exist
Maybe someone can get a closer look to this methods?
Here is the apache log:
The text was updated successfully, but these errors were encountered: