# Win Error 10013 / 10054 / 10060]

## Maya Network Connection Fix Guide (for \[WinError 10013 / 10054 / 10060])

### Overview

This document explains how to resolve Maya tool startup issues caused by network restrictions, particularly the errors:

```
URLError: <urlopen error [WinError 10013]>
URLError: <urlopen error [WinError 10054]>
URLError: <urlopen error [WinError 10060]>
```

These usually occur in network environments with firewalls, strict security software, or proxy/VPN misconfigurations.

***

### Solution

#### 1. Manually Set Proxy in Maya

If you're using a local proxy (e.g., Clash, V2Ray, etc.), add the following to Maya's Script Editor **before starting the tool**:

```python
import os
os.environ['http_proxy'] = 'http://127.0.0.1:7890'
os.environ['https_proxy'] = 'http://127.0.0.1:7890'

import xgtc
import xgToolsUI_user_sub
xgToolsUI_user_sub.XgtRun()
```

> Replace `7890` with your actual local proxy port if it's different.

#### 2. Optional: Auto-load Proxy on Maya Startup

1. Open (or create) the following file:
   * `C:\Users\<your_username>\Documents\maya\2025\scripts\userSetup.py`
2. Add the proxy setup code above.
3. Save and restart Maya.

***

### Soft-Router VPN Users

Browsers may access the internet while Maya cannot because Maya's Python does not inherit system proxy settings. Use the same proxy setup method as above.

***

### Network License Server

Maya licenses may be obtained via RLM, FlexNet, cloud subscription, or standalone licenses. Network license type does not affect plugin access to external servers (like Gumroad/Render).

***

### WinError 10013 / 10054 / 10060

| Error | Meaning                              | Typical Fix                                                                 |
| ----- | ------------------------------------ | --------------------------------------------------------------------------- |
| 10013 | Access forbidden / permission denied | Set proxy, check firewall/antivirus, run as admin                           |
| 10054 | Connection reset by peer             | Check VPN/proxy, ensure server is reachable, network stability              |
| 10060 | Connection timed out                 | Verify network/VPN/proxy, ensure correct IP/port, check server availability |

#### Example: Checking Plugin Connectivity

Gumroad Subscriptions:

```python
import urllib.request
try:
    with urllib.request.urlopen("https://www.gumroad.com", timeout=10) as r:
        print("Gumroad OK:", r.status)
except Exception as e:
    print("Gumroad Failed:", e)
```

NoBrainTools Website Subscriptions:

```python
with urllib.request.urlopen(
    "https://xgt-license-server.onrender.com/healthz", timeout=10) as r:
    print("OK:", r.status)
```

* If fails, set HTTP/HTTPS proxy in Maya as described above (Step 1).

***

### Company Network Notes

* Company may block non-whitelisted programs.
* Maya Python does not inherit system proxy automatically.
* IT may need to allow `maya.exe` or open necessary ports.

***

### Summary

| Issue                         | Cause                                     |
| ----------------------------- | ----------------------------------------- |
| 10013                         | Local system/firewall blocks socket       |
| 10054                         | Remote server forcibly closed connection  |
| 10060                         | Connection timed out / server unreachable |
| Plugin fails / Cannot connect | Maya did not set proxy or VPN ineffective |

***

### Useful Tips

```python
import urllib.request
with urllib.request.urlopen("https://www.google.com", timeout=10) as response:
    print(response.status)
```

* Returns 200 if proxy works.
* If fails, check proxy app and firewall.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nobraintools.gitbook.io/maya-groomers-tool/getting-started/problem-errors/win-error-10013-10054-10060.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
