Skip to content

uniprot_data: boş indirme sonucu için koruma (None-guard)#320

Closed
bushushow wants to merge 48 commits into
saezlab:masterfrom
HUBioDataLab:fix/uniprot-data-none-guard
Closed

uniprot_data: boş indirme sonucu için koruma (None-guard)#320
bushushow wants to merge 48 commits into
saezlab:masterfrom
HUBioDataLab:fix/uniprot-data-none-guard

Conversation

@bushushow

Copy link
Copy Markdown

Özet

pypath.inputs.uniprot.uniprot_data, indirme sonucunu kontrol etmeden next(c.result) çağırıyordu. curl.Curl None döndüğünde anlaşılmaz bir TypeError: 'NoneType' object is not an iterator fırlıyor ve çağıranlar (ör. CROssBAR UniProt adaptörünün download_uniprot_data() adımı) çöküyordu.

Değişiklik

curl.Curl çağrısından sonra c.result is None kontrolü eklendi; boşsa istenen alan ve organizmayı belirten anlaşılır bir RuntimeError fırlatılıyor.

Bağlam

  • UniProt source validation (test_uniprot.ipynb) sırasında bulundu.
  • organism='*' ile büyük cross-reference alanları (xref_geneid, xref_kegg, ...) indirilirken geçici ağ/throttling nedeniyle c.result None/bozuk gelebiliyor ve cryptic hatayla adaptörü çökertiyordu.
  • Aynı veri doğrudan UniProt'tan indirildiğinde eksiksiz geliyor (575.503 protein) — veri/endpoint sağlam; sorun yalnızca hata ele alınışındaydı.
  • biogrid'deki curl.Curl req_headers eklemesine benzer, pypath-seviyesi küçük bir sağlamlık iyileştirmesi.

Etki

Başarılı indirmelerde davranış aynı; yalnızca başarısız/boş indirmede anlaşılır hata veriliyor.

ervau and others added 30 commits December 14, 2023 12:14
…stic Ontology Term and Factor Value Ontology Term does not have any equal rows
hnurydn and others added 18 commits October 31, 2024 10:21
BioGRID's Cloudflare CDN returns HTTP 403/429 to pypath's default
User-Agent. Add browser-like headers to the curl.Curl calls in
biogrid_interactions() and biogrid_all_interactions() to avoid blocking.
Refactor column dropping logic to protect specific columns from being dropped when all values are NaN. Added stripping of whitespace from column names.
Refactor async download method to improve error handling and streamline content type checks.
`uniprot_data`, indirmenin başarılı olup olmadığını kontrol etmeden
`next(c.result)` çağırıyordu. `curl.Curl` `None` döndüğünde (örn. büyük
`organism='*'` sorgularında geçici ağ/sunucu hatası), bu satır anlaşılmaz
bir `TypeError: 'NoneType' object is not an iterator` fırlatıyor ve
CROssBAR UniProt adaptörünün `download_uniprot_data()` adımı gibi
çağıranları çökertiyordu.

Sonuç boş geldiğinde, istenen alan ve organizmayı belirten anlaşılır bir
`RuntimeError` fırlatılır; böylece hata anlaşılır ve yeniden denenebilir olur.
@bushushow bushushow closed this Jul 6, 2026
@deeenes

deeenes commented Jul 8, 2026

Copy link
Copy Markdown
Member

Hello Busra @bushushow & everyone else, Bunyamin, Erva, Havvanur, Sila, and others! :)

Many thanks for the PRs, I'm happy to review and merge them. Did you close it because you wanna include more commits? Maybe it would also make sense to have a chat about what are you up to, how the entire OmniPath stack evolves, and how we could collaborate more efficiently. At this point we refactored and reimplemented almost all key components of OmniPath, and in many instances it would be better for you to use the new stack. We can continue in email, feel free to write me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants