suqingdong / omim

omim database
https://suqingdong.github.io/omim/
23 stars 9 forks source link

omim update failed #3

Open asaki1986 opened 1 year ago

asaki1986 commented 1 year ago

Hi,

I am using omim to fetch the data and annotate the genes. Errors were found when update was applied.

[2022-10-19 22:50:40 OMIM-CLI main DEBUG MainThread:43] dealing with: [88/27982] 102730 [2022-10-19 22:50:41 WebRequest get_response WARNING MainThread:78] 1st time bad status code: 404 [] [2022-10-19 22:50:46 WebRequest get_response WARNING MainThread:78] 2st time bad status code: 404 [] [2022-10-19 22:50:50 WebRequest get_response WARNING MainThread:78] 3st time bad status code: 404 [] [2022-10-19 22:50:54 WebRequest get_response WARNING MainThread:78] 4st time bad status code: 404 [] ^C[2022-10-19 22:50:55 Manager __exit__ DEBUG MainThread:33] database closed.

How can I fix this issue?

Thanks,

Junfeng

verygooder commented 1 year ago

I met the same problem

skip mim_number: 102710 [2022-11-10 11:42:53 OMIM-CLI main DEBUG MainThread:43] dealing with: [87/28011] 102720 skip mim_number: 102720 [2022-11-10 11:42:53 OMIM-CLI main DEBUG MainThread:43] dealing with: [88/28011] 102730 [2022-11-10 11:42:55 WebRequest get_response WARNING MainThread:78] 1st time bad status code: 404 [] [2022-11-10 11:43:00 WebRequest get_response WARNING MainThread:78] 2st time bad status code: 404 [] [2022-11-10 11:43:04 WebRequest get_response WARNING MainThread:78] 3st time bad status code: 404 [] [2022-11-10 11:43:08 WebRequest get_response WARNING MainThread:78] 4st time bad status code: 404 [] ^C[2022-11-10 11:43:11 Manager exit DEBUG MainThread:33] database closed.

Reborn-J commented 6 months ago

If the OMIM database website has been updated, you need to append '/entry' to the URL before parsing the 'prefix'

./omim/core/entry.py url = self.omim_url + '/entry' + f'/{mim}' soup = self.get_soup(url)

    prefix = soup.select_one('#title').find_next_sibling('div').select_one('.mim-highlighted mim-highlight strong')
raonyguimaraes commented 4 months ago

Thanks @Reborn-J works like a charm!