ipazc / nanoblocks Goto Github PK
View Code? Open in Web Editor NEWJust another Nano cryptocurrency python package
License: MIT License
Just another Nano cryptocurrency python package
License: MIT License
Hello!
Many public nodes have the timezone set to "CEST", which is not a real timezone, which means that when parsing the account, this exception is thrown.
from nanoblocks.node import NanoNode
from nanoblocks.network import NanoNetwork
my_address = "nano_3x3r177uxmk33hi9wk186dmhhikicbs79h78g8bmci8ghqxc7bqbg6x6a1oa"
node = NanoNode("https://mynano.ninja/api/node", "wss://ws.mynano.ninja/")
network = NanoNetwork(node)
account = network.accounts[my_address]
print(account) # The print statement throws error
Traceback (most recent call last):
File "app.py", line 13, in <module>
print(account)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/nanoblocks/account/account.py", line 430, in __str__
return f"{self.address} (\n\t" \
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/nanoblocks/account/account.py", line 388, in modified_date
m_datetime = pd.to_datetime(
File "pandas/_libs/tslibs/timestamps.pyx", line 1378, in pandas._libs.tslibs.timestamps.Timestamp.tz_convert
File "pandas/_libs/tslibs/timestamps.pyx", line 1094, in pandas._libs.tslibs.timestamps.Timestamp.__new__
File "pandas/_libs/tslibs/timezones.pyx", line 114, in pandas._libs.tslibs.timezones.maybe_get_tz
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pytz/__init__.py", line 188, in timezone
raise UnknownTimeZoneError(zone)
pytz.exceptions.UnknownTimeZoneError: 'CEST'
CEST should be transformed to a real timezone, such as Europe/Paris, Europe/Berlin or Europe/Prague (or another one)
Or ignore timezone
Relevant: https://stackoverflow.com/questions/10913986/correctly-parse-date-string-with-timezone-information
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.