Skip to content

[WIP] Fix bug in segment chemical structures from file method#130

Closed
Copilot wants to merge 1 commit intomasterfrom
copilot/fix-segment-chemical-structures-error
Closed

[WIP] Fix bug in segment chemical structures from file method#130
Copilot wants to merge 1 commit intomasterfrom
copilot/fix-segment-chemical-structures-error

Conversation

Copy link
Copy Markdown

Copilot AI commented Oct 13, 2025

  • Analyze the issue with model download from Zenodo
  • Add better error handling for network failures in load_model()
  • Add informative error messages with instructions for manual download
  • Add timeout parameter to requests.get() to prevent indefinite hanging
  • Test the changes with simulated network failure scenarios
Original prompt

This section details on the original issue you should resolve

<issue_title>Bugs for using the method 'segment_chemical_structures_from_file'</issue_title>
<issue_description>When I use the method 'segment_chemical_structures_from_file', it goes error like:

HTTPSConnectionPool(host='zenodo.org', port=443): Max retries exceeded with url: /record/10663579/files/mask_rcnn_molecule.h5?download=1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7e7581a0f520>: Failed to establish a new connection: [Errno 111] Connection refused')

What's wrong of that? It occurs to the phase of model downloading...

Hopefully you can help me!</issue_description>

<agent_instructions>If the author does not reply within 2 weeks of time close it</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@Kohulan Hi @HenryStephen ,

Could you check whether your environment has a stable internet connection? On the first run, the package tries to automatically download the model (mask_rcnn_molecule.h5) from Zenodo. The error message suggests the connection to zenodo.org was refused, which usually points to a network issue (firewall, VPN, or temporary outage).

If you’re behind a firewall or proxy, you may need to adjust your settings

Fixes #127


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

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.

Bugs for using the method 'segment_chemical_structures_from_file'

2 participants