Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ConnectionRefusedError raising #2326

Merged
Merged
Changes from all commits
Commits
Show all changes
280 commits
Select commit Hold shift + click to select a range
087b1ff
Fix order import problem for bt/__init__.py
roman-opentensor Aug 1, 2024
702b74e
Remove unused error parser based on metadata
roman-opentensor Aug 1, 2024
d69e6ed
Move `delegates_details_url` from bt/__init__.py to settings.py
roman-opentensor Aug 1, 2024
d17fdad
Bump up setuptools version
roman-opentensor Aug 1, 2024
c047b48
Make version.py bittensor import independent
roman-opentensor Aug 2, 2024
a262dd0
Update setup.py, replace file with the __version__
roman-opentensor Aug 2, 2024
1b7ceda
Update settings.py
roman-opentensor Aug 2, 2024
544c4b7
Make axon independent of bittensor import. Fix axon tests.
roman-opentensor Aug 2, 2024
316f7af
Make chain_data.py independent of bittensor import. Fix chain_data te…
roman-opentensor Aug 2, 2024
23ba67b
Make dendrite.py independent of bittensor import. Fix dendrite tests.
roman-opentensor Aug 2, 2024
137b929
Make staking.py independent of bittensor import. Fix staking tests.
roman-opentensor Aug 2, 2024
1b228ed
Make subtensor.py independent of bittensor import. Fix subtensor tests.
roman-opentensor Aug 2, 2024
ffa30b5
Make prometheus.py independent of bittensor import. Fix prometheus te…
roman-opentensor Aug 2, 2024
6bd0647
Axon refactoring
roman-opentensor Aug 2, 2024
856be50
Move subnets.py into bittensor/utils since this module is not used wi…
roman-opentensor Aug 2, 2024
a859e94
Make synapse.py independent of bittensor import. Fix synapse tests.
roman-opentensor Aug 2, 2024
dc394d8
Make tensor.py independent of bittensor import. Fix tensor tests.
roman-opentensor Aug 2, 2024
6db9a38
Change name `bittensor.utils.hash` -> `bittensor.utils.get_hash`
roman-opentensor Aug 2, 2024
a23ff8c
Moved from using `import bittensor` (withing bittensor codebase) to d…
roman-opentensor Aug 5, 2024
a95ee4c
Add backwards compatibility for 'bittensor.api.extrinsics' as 'bitten…
roman-opentensor Aug 5, 2024
f68ed6e
Move the contents of `wallet_utils.py` to `bittensor/utils/__init__.p…
roman-opentensor Aug 5, 2024
3c6aa67
Delete `bccli` staff and related tests. Fix setup.py.
roman-opentensor Aug 5, 2024
a74c5c5
Fix tests.
roman-opentensor Aug 5, 2024
f254172
Makes the `bittensor.utils.mock` subpackage available as `bittensor.m…
roman-opentensor Aug 5, 2024
f55982c
Check for participation before nomination call
roman-opentensor Aug 5, 2024
da89cd3
Ruff formatting. Fix ruff's complaints.
roman-opentensor Aug 5, 2024
79a4393
Removing obsolete, unused (community and bittensor) code
roman-opentensor Aug 6, 2024
70f1545
Move backwards compatibility related content to `bittensor/utils/back…
roman-opentensor Aug 6, 2024
4323e21
Merge pull request #2204 from opentensor/feat/roman/btsdk-structure
roman-opentensor Aug 6, 2024
8c4de4c
Merge remote-tracking branch 'refs/remotes/origin/btsdk' into feat/ro…
roman-opentensor Aug 6, 2024
db7c000
btlogging/loggingmachine.py improvement from https://github.com/opent…
roman-opentensor Aug 7, 2024
03cee6d
Merge remote-tracking branch 'refs/remotes/origin/fix/streaming-synap…
roman-opentensor Aug 7, 2024
f80c2b9
Fixes after `Merge streaming fix to staging` from https://github.com/…
roman-opentensor Aug 7, 2024
82f8dca
Review fix.
roman-opentensor Aug 7, 2024
f15fef3
Merge pull request #2206 from opentensor/feat/roman/btsdk-structure-p…
roman-opentensor Aug 7, 2024
66f0245
Remove black from dev requirements.
roman-opentensor Aug 7, 2024
78da7fc
black back
roman-opentensor Aug 7, 2024
0b0c9ab
Remove space from prod.txt. Remove black from dev.txt
roman-opentensor Aug 7, 2024
ef5634d
Merge pull request #2210 from opentensor/feat/roman/staging-into-btsdk
roman-opentensor Aug 7, 2024
20b7fa6
Add dendrite reference to backwords compatibility
roman-opentensor Aug 8, 2024
9028263
Merge pull request #2217 from opentensor/fix/roman/dendrite
roman-opentensor Aug 8, 2024
49e1086
Fix the usage of env vars in default settings.
roman-opentensor Aug 8, 2024
ed836e6
ruff
roman-opentensor Aug 8, 2024
0975c7d
Merge pull request #2218 from opentensor/fix/roman/local_env_vars
ibraheem-opentensor Aug 8, 2024
7a0d94a
Change the subpackage name to `deprecated`
roman-opentensor Aug 9, 2024
fcdd283
Update __version__ until 8.0.0
roman-opentensor Aug 9, 2024
69e2ae9
Move `subnets.py` to `bittensor/utils` as it is considered more utili…
roman-opentensor Aug 9, 2024
a6d1554
Rename test module
roman-opentensor Aug 9, 2024
141bbe8
Add aliases mapping test
roman-opentensor Aug 9, 2024
6dbb610
ruff
roman-opentensor Aug 9, 2024
cc47bd2
Merge pull request #2220 from opentensor/fix/roman/deprecated
roman-opentensor Aug 9, 2024
40a487e
Init: Adds initial e2e tests
ibraheem-opentensor Aug 9, 2024
0d8a256
Ruff
ibraheem-opentensor Aug 9, 2024
2400884
Fixes LOCALNET_SH_PATH env_var
ibraheem-opentensor Aug 10, 2024
3f48492
Adds module description
ibraheem-opentensor Aug 10, 2024
5e70834
Merge pull request #2221 from opentensor/tests/adds-e2e-test-setup
ibraheem-opentensor Aug 12, 2024
bbe6c8a
Adds commit-reveal back and adds e2e for liquid alpha & commit reveal
ibraheem-opentensor Aug 13, 2024
9b74921
Review suggestions implemented
ibraheem-opentensor Aug 13, 2024
b417ef1
Fixes logging string
ibraheem-opentensor Aug 13, 2024
91017a7
Merge pull request #2224 from opentensor/tests/e2e-liquid-alpha-commi…
ibraheem-opentensor Aug 13, 2024
8109814
Enhance: Switch from format() to f-strings
roman-opentensor Aug 13, 2024
b0bc7ad
ruff
roman-opentensor Aug 13, 2024
38bbf7b
Merge pull request #2228 from opentensor/feat/roman/enhance-switch-fr…
roman-opentensor Aug 13, 2024
4e44f13
Optimize imports
roman-opentensor Aug 13, 2024
0e8b230
Add the opportunity to run `python - m bittensor`
roman-opentensor Aug 13, 2024
7791b2d
replace deps link from https to ssh
roman-opentensor Aug 13, 2024
6b43968
Merge pull request #2230 from opentensor/feat/roman/reafctoring-befor…
roman-opentensor Aug 13, 2024
93e0afd
Fixes metagraph save/load for neurons, added e2e tests (metagraph + e…
ibraheem-opentensor Aug 13, 2024
94906ea
Renamed test
ibraheem-opentensor Aug 14, 2024
5470afc
Adds missing statements
ibraheem-opentensor Aug 14, 2024
115fb7d
Merge pull request #2231 from opentensor/tests/adds-metagraph-and-ext…
ibraheem-opentensor Aug 14, 2024
6bf30eb
increase subtensor.py test coverage until 80%
roman-opentensor Aug 20, 2024
8979da6
ruff
roman-opentensor Aug 20, 2024
7f5fc11
add tests
roman-opentensor Aug 20, 2024
a4ecc1f
ruff
roman-opentensor Aug 20, 2024
023a48f
add tests _do_serve_prometheus
roman-opentensor Aug 20, 2024
7643074
add tests neuron_for_uid
roman-opentensor Aug 20, 2024
c116950
sort tests by group
roman-opentensor Aug 20, 2024
5889b6a
sort tests by group
roman-opentensor Aug 20, 2024
70de895
Merge remote-tracking branch 'origin/tests/roman/subtensor-test-cover…
roman-opentensor Aug 20, 2024
fe65dd1
remove unused import
roman-opentensor Aug 20, 2024
7d67af7
add test for `get_neuron_for_pubkey_and_subnet`
roman-opentensor Aug 20, 2024
fbf4cd4
Merge pull request #2252 from opentensor/tests/roman/subtensor-test-c…
roman-opentensor Aug 20, 2024
97cba4b
Add unit tests to subtensor.py
roman-opentensor Aug 20, 2024
7d37670
Fix ruff + `test_do_set_weights_no_waits` description
roman-opentensor Aug 20, 2024
8dd7322
Merge pull request #2256 from opentensor/tests/roman/subtensor-test-c…
roman-opentensor Aug 20, 2024
dab0bbd
add tests
roman-opentensor Aug 20, 2024
64e4c26
ruff + add tests
roman-opentensor Aug 20, 2024
d420c1e
ruff
roman-opentensor Aug 20, 2024
4fa1bb5
add test
roman-opentensor Aug 21, 2024
e1c0368
fix unused imports
roman-opentensor Aug 21, 2024
3338fdb
Config refactoring
roman-opentensor Aug 21, 2024
8337d11
Merge pull request #2257 from opentensor/tests/roman/increase-sdk-tes…
roman-opentensor Aug 21, 2024
ac35a49
Remove duplicated tests
roman-opentensor Aug 21, 2024
4f686c5
add test
roman-opentensor Aug 21, 2024
4a81610
remove duplicated import
roman-opentensor Aug 21, 2024
3918a2e
remove unused functions
roman-opentensor Aug 21, 2024
a6b4105
remove unused functions + add tests
roman-opentensor Aug 21, 2024
f155729
ruff
roman-opentensor Aug 21, 2024
599ea3c
fix type annotation
roman-opentensor Aug 21, 2024
b3c9fc9
add tests
roman-opentensor Aug 21, 2024
e2b0138
Add tests and remove unused functions
roman-opentensor Aug 21, 2024
7fa9988
fix test
roman-opentensor Aug 22, 2024
3350b09
ruff
roman-opentensor Aug 22, 2024
0576bc5
Add balance tests, small refactoring
roman-opentensor Aug 22, 2024
f7002c4
Add init test for bittensor
roman-opentensor Aug 22, 2024
7dccc30
ruff
roman-opentensor Aug 22, 2024
a465616
Add tests for utils.weight_utils.py
roman-opentensor Aug 22, 2024
0ac5208
add tests for bittensor.utils.subnets
roman-opentensor Aug 22, 2024
252918f
ruff
roman-opentensor Aug 22, 2024
b57f0b0
update test file
roman-opentensor Aug 22, 2024
8087fa0
Decoupling chain_data.py to sub-package
roman-opentensor Aug 23, 2024
20480e0
Fix test
roman-opentensor Aug 23, 2024
e67da2f
ruff
roman-opentensor Aug 23, 2024
2fb47e3
review fix
roman-opentensor Aug 23, 2024
becf083
Merge pull request #2264 from opentensor/feat/roman/decoupling-chain-…
roman-opentensor Aug 23, 2024
6663b85
update `requirements/prod.txt`
roman-opentensor Aug 23, 2024
fb81fe7
Merge pull request #2266 from opentensor/feat/roman/update-prod-requi…
roman-opentensor Aug 23, 2024
effb2d2
Merge pull request #2262 from opentensor/tests/roman/utils-tests
roman-opentensor Aug 26, 2024
ff7853f
Update localnet entrypoint port
roman-opentensor Aug 27, 2024
137a396
Add substrate reconnection logic
roman-opentensor Aug 27, 2024
2d8a202
Fix tests + add tests
roman-opentensor Aug 27, 2024
bfe64c3
Ruff formatter
roman-opentensor Aug 27, 2024
c26470b
Merge pull request #2269 from opentensor/feat/roman/add-reconnection-…
roman-opentensor Aug 27, 2024
b7d0f57
add docstring to the decorator
roman-opentensor Aug 27, 2024
be770cf
update requirements
roman-opentensor Aug 29, 2024
5a9c5a9
update requirements
roman-opentensor Aug 29, 2024
84e5b2f
update requirements
roman-opentensor Aug 29, 2024
0d3e8e8
cleanup __init__.py
roman-opentensor Aug 29, 2024
08da14f
- move `extrinsics` from deprecated into `bittensor/core`;
roman-opentensor Aug 30, 2024
c7c6838
update ssh to https in requirements
roman-opentensor Aug 30, 2024
9f439c6
Merge pull request #2278 from opentensor/fear/roman/moce-extrinsics
roman-opentensor Aug 30, 2024
d971554
add reconnection logic for correctly closed connection
roman-opentensor Sep 3, 2024
6281bcf
remove unused import
roman-opentensor Sep 3, 2024
ca6742a
Merge pull request #2283 from opentensor/fix/roman/update-reconnectio…
roman-opentensor Sep 3, 2024
2f568ab
fix pagination
roman-opentensor Sep 3, 2024
34bcfd1
Move do_* methods into the related extrinsic module (commit_weights.py).
roman-opentensor Sep 4, 2024
7af43c8
Move do_* methods into the related extrinsic module (bittensor/core/e…
roman-opentensor Sep 4, 2024
4f4cad8
Move do_* methods into the related extrinsic module (bittensor/core/e…
roman-opentensor Sep 4, 2024
9a55af0
Move do_* methods into the related extrinsic module (bittensor/core/e…
roman-opentensor Sep 5, 2024
7846965
Move do_* methods into the related extrinsic module (bittensor/core/e…
roman-opentensor Sep 5, 2024
453c7a7
bug fixes
roman-opentensor Sep 5, 2024
5cdb9be
extrinsics refactoring
roman-opentensor Sep 5, 2024
841db03
bug fix
roman-opentensor Sep 5, 2024
f61c732
ruff
roman-opentensor Sep 5, 2024
481bf8a
fix
roman-opentensor Sep 5, 2024
1d6e942
removed exit sys call for ConnectionRefusedError in _get_substrate
roman-opentensor Sep 6, 2024
1796452
remove unused import
roman-opentensor Sep 6, 2024
ad23601
change the log message
roman-opentensor Sep 6, 2024
7ad2ca8
Merge pull request #2288 from opentensor/fix/roman/removed-exit-sys-c…
roman-opentensor Sep 6, 2024
d3a60fa
Corrected arguments order in logging methods + test
roman-opentensor Sep 6, 2024
dd8f65c
Merge pull request #2292 from opentensor/fix/roman/corrected-argument…
roman-opentensor Sep 6, 2024
3323569
Merge remote-tracking branch 'origin/btsdk' into feat/roman/move-unde…
roman-opentensor Sep 6, 2024
7b1e984
fix integration test
roman-opentensor Sep 6, 2024
38755e7
ruff
roman-opentensor Sep 6, 2024
1773391
comments fixes
roman-opentensor Sep 9, 2024
3ef3573
fix `bittensor/core/subtensor.py:445: error: Argument "logger" to "re…
roman-opentensor Sep 9, 2024
50f1485
integrate `bt_decode` into BTSDK
roman-opentensor Sep 9, 2024
2a92b69
fix logger linter checker
roman-opentensor Sep 9, 2024
fdabdb5
Merge pull request #2299 from opentensor/fix/roman/btsdk-fix-linter-c…
roman-opentensor Sep 9, 2024
d609609
Merge branch 'btsdk' into feat/roman/integrate-bt-decoder
roman-opentensor Sep 9, 2024
2fa5372
Reverts logging enhancement
roman-opentensor Sep 10, 2024
e0ad585
Merge pull request #2286 from opentensor/feat/roman/move-underscored-…
roman-opentensor Sep 10, 2024
02b470c
Merge remote-tracking branch 'origin/btsdk' into feat/roman/integrate…
roman-opentensor Sep 10, 2024
b379833
Merge pull request #2298 from opentensor/feat/roman/integrate-bt-decoder
roman-opentensor Sep 10, 2024
6d6784b
remove unused code and tests
roman-opentensor Sep 11, 2024
69eca67
remove unused imports
roman-opentensor Sep 11, 2024
1797bbb
Merge pull request #2303 from opentensor/feat/roman/cleanup
roman-opentensor Sep 11, 2024
e9c9090
modification of error formatter, moved the submit_extrinsic call to u…
roman-opentensor Sep 13, 2024
736358b
ruff
roman-opentensor Sep 13, 2024
12680b1
Improved logic for concatenating message, prefix, and suffix in bitte…
roman-opentensor Sep 13, 2024
38f4eb8
fix + ruff
roman-opentensor Sep 13, 2024
bdeaede
remove unused import
roman-opentensor Sep 13, 2024
6f2ce29
improve btlogging concat test
roman-opentensor Sep 13, 2024
924e6fb
docs AxonInfo
roman-opentensor Sep 13, 2024
f98725b
docs DelegateInfo
roman-opentensor Sep 13, 2024
45b754b
DelegateInfoLite
roman-opentensor Sep 13, 2024
4fd4da3
IPInfo
roman-opentensor Sep 13, 2024
780e5ea
NeuronInfo
roman-opentensor Sep 13, 2024
ab28b32
NeuronInfo + NeuronInfoLite
roman-opentensor Sep 13, 2024
99ca720
PrometheusInfo
roman-opentensor Sep 13, 2024
f634ef6
ProposalVoteData
roman-opentensor Sep 13, 2024
ba44e78
ScheduledColdkeySwapInfo
roman-opentensor Sep 13, 2024
02bf796
ProposalVoteData
roman-opentensor Sep 13, 2024
5882dd4
StakeInfo
roman-opentensor Sep 13, 2024
6786225
StakeInfo + SubnetHyperparameters
roman-opentensor Sep 13, 2024
572d747
bittensor/core/chain_data/utils.py
roman-opentensor Sep 16, 2024
e052125
bittensor/core/axon.py
roman-opentensor Sep 16, 2024
f89cdee
bittensor/core/axon.py
roman-opentensor Sep 16, 2024
90e837c
bittensor/core/config.py
roman-opentensor Sep 16, 2024
f164e49
bittensor/core/dendrite.py
roman-opentensor Sep 16, 2024
e548094
bittensor/core/metagraph.py
roman-opentensor Sep 16, 2024
b29b6f2
bittensor/core/stream.py
roman-opentensor Sep 16, 2024
8d6b37b
bittensor/core/subtensor.py
roman-opentensor Sep 16, 2024
0d7af8d
bittensor/core/synapse.py
roman-opentensor Sep 16, 2024
ba6957b
bittensor/core/tensor.py
roman-opentensor Sep 16, 2024
8bf2d9a
replace Tuple, Dict, List, Set to python native types
roman-opentensor Sep 16, 2024
9f567c2
bittensor/__init__.py
roman-opentensor Sep 16, 2024
0bf1f1c
bittensor/utils/weight_utils.py
roman-opentensor Sep 16, 2024
ca8d5d0
bittensor/utils/version.py
roman-opentensor Sep 16, 2024
3b14845
bittensor/utils/btlogging
roman-opentensor Sep 17, 2024
6607746
fix
roman-opentensor Sep 17, 2024
478576b
remove wrong `optional` from docstring's annotations
roman-opentensor Sep 17, 2024
65b50cb
apply camel case rule
roman-opentensor Sep 17, 2024
0bfde19
bittensor/core/extrinsics/commit_weights.py
roman-opentensor Sep 17, 2024
213e57a
bittensor/core/extrinsics/prometheus.py
roman-opentensor Sep 17, 2024
a335b19
bittensor/core/extrinsics/serving.py
roman-opentensor Sep 17, 2024
307a266
axon improvement (add annotation)
roman-opentensor Sep 17, 2024
df57f4d
README updates for SDK
rajkaramchedu Sep 17, 2024
f76ea38
bittensor/core/extrinsics/set_weights.py
roman-opentensor Sep 17, 2024
a6d14bc
bittensor/core/extrinsics/transfer.py
roman-opentensor Sep 17, 2024
0f7e701
fix
roman-opentensor Sep 17, 2024
4d8ed9f
weight_utils.py
roman-opentensor Sep 17, 2024
a906522
check up and fix
roman-opentensor Sep 17, 2024
6900833
fix Axon Signature
roman-opentensor Sep 17, 2024
14e1464
fix axon
roman-opentensor Sep 17, 2024
850d5a2
delete unused import
roman-opentensor Sep 17, 2024
678efe6
update GPG
roman-opentensor Sep 17, 2024
ae2fd66
Merge pull request #2306 from opentensor/feat/roman/improve-logging
roman-opentensor Sep 17, 2024
50df922
remove unused code, remove old tests, add new tests
roman-opentensor Sep 17, 2024
9d06d35
fix
roman-opentensor Sep 17, 2024
4e09490
temp commented line
roman-opentensor Sep 17, 2024
826ac12
fix review comments
roman-opentensor Sep 17, 2024
10dee4a
fix review comments
roman-opentensor Sep 17, 2024
29e7d82
Merge pull request #2305 from opentensor/feat/roman/custom-error-handler
roman-opentensor Sep 17, 2024
23c0489
Adding TOC and working in review comments.
rajkaramchedu Sep 17, 2024
e8ab3b9
Merge pull request #2311 from opentensor/feat/roman/remove-class-tensor
roman-opentensor Sep 17, 2024
98b2610
Adding installation options
rajkaramchedu Sep 17, 2024
257b9a1
Formatting adjustments for html display
rajkaramchedu Sep 18, 2024
45c0ef9
Ruff formatted
rajkaramchedu Sep 18, 2024
e4afdec
Example reformatted
rajkaramchedu Sep 18, 2024
a03aa83
Merge branch 'btsdk' into btsdk-docs/roman/docstrings-improvement
roman-opentensor Sep 18, 2024
a052ef5
update metagraph
roman-opentensor Sep 18, 2024
44f7358
update dendrite.py
roman-opentensor Sep 18, 2024
87a923d
Merge pull request #2310 from opentensor/btsdk-docs/roman/docstrings-…
roman-opentensor Sep 18, 2024
6dc4814
Update README.md
roman-opentensor Sep 18, 2024
83b1426
Update README.md
roman-opentensor Sep 18, 2024
55dd03d
Merge pull request #2309 from opentensor/rajk/revise-README
roman-opentensor Sep 18, 2024
305b149
Update README.md
roman-opentensor Sep 18, 2024
bacde39
Update axon.py
roman-opentensor Sep 18, 2024
2047fac
fix tests/unit_tests/test_axon.py
roman-opentensor Sep 25, 2024
454c80d
Update README.md
rajkaramchedu Sep 25, 2024
c469460
Merge pull request #2320 from opentensor/rajkaramchedu-patch-1
roman-opentensor Sep 25, 2024
628217c
set `WARNING` level ad default logging level
roman-opentensor Sep 25, 2024
7b92071
fix test
roman-opentensor Sep 25, 2024
93729a4
Merge pull request #2321 from opentensor/feat/roman/logging-default-w…
roman-opentensor Sep 25, 2024
bd8f8f5
add ConnectionRefusedError raising
roman-opentensor Sep 30, 2024
51c03bd
Merge branch 'staging' into feat/roman/substrate-definition-before-in…
roman-opentensor Oct 1, 2024
e294815
Merge branch 'staging' into feat/roman/substrate-definition-before-in…
roman-opentensor Oct 1, 2024
e0672f6
remove unused file
roman-opentensor Oct 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions bittensor/core/subtensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ def __init__(

self.log_verbose = log_verbose
self._connection_timeout = connection_timeout
self.substrate: "SubstrateInterface" = None
roman-opentensor marked this conversation as resolved.
Show resolved Hide resolved
self._get_substrate()

def __str__(self) -> str:
Expand All @@ -201,7 +202,8 @@ def __repr__(self) -> str:

def close(self):
"""Cleans up resources for this subtensor instance like active websocket connection and active extensions."""
self.substrate.close()
if self.substrate:
self.substrate.close()

def _get_substrate(self):
"""Establishes a connection to the Substrate node using configured parameters."""
Expand All @@ -223,14 +225,15 @@ def _get_substrate(self):
except (AttributeError, TypeError, socket.error, OSError) as e:
logging.warning(f"Error setting timeout: {e}")
roman-opentensor marked this conversation as resolved.
Show resolved Hide resolved

except ConnectionRefusedError:
except ConnectionRefusedError as error:
logging.error(
f"Could not connect to {self.network} network with {self.chain_endpoint} chain endpoint.",
)
logging.info(
"You can check if you have connectivity by running this command: nc -vz localhost "
f"{self.chain_endpoint.split(':')[2]}"
f"{self.chain_endpoint}"
)
raise ConnectionRefusedError(error.args)
roman-opentensor marked this conversation as resolved.
Show resolved Hide resolved

@staticmethod
def config() -> "Config":
Expand Down
Loading