Git Product home page Git Product logo

Comments (5)

ryukinix avatar ryukinix commented on July 30, 2024

Thanks for catch that.

Well... this is indeed not a valid date and need to be to parse correctly here: api.py. There a couple of ways to fix that. As this is about how MAL works, I think we should not close the whole application because of that or give any error about it. Because is not a error of MyAnimeList, is a feature (how the PHP developers say, they say). The design is wrong, but that is other history.

A simple strategy to implement one fix for that is keep the raw date untouched, as 2011-05-00 in your case, if a exception is signalized. Or to avoid try/exception blocks, just split by - and check if some of the tokens are a 0 filled string.

As you see, methods with decorator @checked_regex and @checked_connection on api.py did handle exceptions very well, but I did not write a special case for date format on _fdate because I didn't even know that MyAnimeList would be send even MORE TYPES of invalid date here.

Anyway, the MAL API... what are they thinking to put a invalid date to store a information of a PARTIAL-DATE?. :/ well, as the MAL API is so wrong in so many levels, this is not even a surprise...

from mal.

ryukinix avatar ryukinix commented on July 30, 2024

Just one thing, I know are you using the PS prompt of Windows, but Ctrl-C doesn't send a SIGINT signal and close the application when the application throw a exception? Are you tested that?

I don't have sure if Windows implement the POSIX signals, although Windows is not a POSIX system at all.

from mal.

ryukinix avatar ryukinix commented on July 30, 2024

I implemented a simple fix just for you on date-fix feature branch.

Please, reinstall your mal application with that command:

pip install git+https://www.github.com/ryukinix/mal.git@date-fix

Give me a feedback if this works for you.

from mal.

evanjs avatar evanjs commented on July 30, 2024

Yeah, scratch the interrupt statement. Ctrl+C works fine on Gentoo (4.13.4).
Fix seems to work:

PS C:\Users\evanjs> mal filter 'Naruto.*' --extend
Matched 3 items:
1: Naruto
   Completed at 220/220 episodes with score 10
   Started: 03-04-2011   Finished: NA
   Tags: ナルト

2: Naruto x UT
   Completed at 1/1 episodes with score 10
   Started: NA   Finished: NA
   Tags: None

3: Naruto: Shippuuden
   Watching at 387/500 episodes with score 9
   Started: 2011-05-00   Finished: NA
   Tags: ナルト疾

from mal.

ryukinix avatar ryukinix commented on July 30, 2024

Nice to hear about it.

from mal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.