Comments (8)
Output with debugging enabled:
# ses_report -d -c
DEBUG:sasutils.ses:ses_get_snic_nickname: executing: ['sg_ses', '--page=snic', '-I0', '/dev/sg136']
DEBUG:sasutils.ses:ses_get_snic_nickname: sg_ses: SMC946 R39 1C
DEBUG:sasutils.ses:ses_get_snic_nickname: sg_ses: Subenclosure nickname status diagnostic page:
DEBUG:sasutils.ses:ses_get_snic_nickname: sg_ses: number of secondary subenclosures: 0
DEBUG:sasutils.ses:ses_get_snic_nickname: sg_ses: generation code: 0x0
DEBUG:sasutils.ses:ses_get_snic_nickname: sg_ses: subenclosure identifier: 0
DEBUG:sasutils.ses:ses_get_snic_nickname: sg_ses: nickname status: 0x0
DEBUG:sasutils.ses:ses_get_snic_nickname: sg_ses: nickname additional status: 0x0
DEBUG:sasutils.ses:ses_get_snic_nickname: sg_ses: nickname language code:
DEBUG:sasutils.ses:ses_get_snic_nickname: sg_ses: nickname: Eval Board Nickname Simulator
DEBUG:sasutils.ses:ses_get_ed_metrics: executing: ['sg_ses', '--page=ed', '--join', '/dev/sg136']
Traceback (most recent call last):
File "/usr/bin/ses_report", line 11, in <module>
load_entry_point('sasutils==0.3.10', 'console_scripts', 'ses_report')()
File "/usr/lib/python3/dist-packages/sasutils/cli/ses_report.py", line 120, in main
ses_report()
File "/usr/lib/python3/dist-packages/sasutils/cli/ses_report.py", line 96, in ses_report
for edinfo in ses_get_ed_metrics(sg_dev.name):
File "/usr/lib/python3/dist-packages/sasutils/ses.py", line 87, in ses_get_ed_metrics
for element_type, descriptor, line in _ses_get_ed_line(sg_name):
File "/usr/lib/python3/dist-packages/sasutils/ses.py", line 69, in _ses_get_ed_line
for line in stdout.decode("utf-8").splitlines():
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 48894: invalid start byte
from sasutils.
I believe this snip from the output has UTF-8 weirdness in it
C94600H39A70017 T [3,0] Element type: Enclosure
Enclosure Status:
Predicted failure=0, Disabled=0, Swap=0, status: OK
Ident=0, Time until power cycle=0, Failure indication=0
Warning indication=0, Requested power off duration=0
Failure requested=0, Warning requested=0
The following is detected
Non-ASCII characters found (highlighted in red)
[Character #47856] 39A70017 �T� [3,0] Element t
When analyzing the redirected output using https://pages.cs.wisc.edu/~markm/ascii.html
from sasutils.
from sasutils.
Good catch @gdevenyi! Thanks for the report. We need to be more robust when processing such output. I'll have a look at it ASAP.
from sasutils.
Hi, it looks like in fact you're probably doing things right with regards to UTF-8, but the encoding might be invalid UTF-8 and the default for decoding errors is 'strict' which bails out.
I added errors='backslashreplace'
(ref: https://docs.python.org/3/library/codecs.html#error-handlers ) and it could continue:
sasutils.ses_report.Eval.Enclosure.C94600H39A70017____________\x80T OK
from sasutils.
Hi @gdevenyi, do you think you could submit a PR to fix it? I like this idea. It requires Python 3.5+ but that seems okay with me.
from sasutils.
See #15
from sasutils.
Thanks!
from sasutils.
Related Issues (20)
- sas_devices outputs warning HOT 2
- sas_sd_snic_alias outputs warning HOT 7
- unpack_from requires a buffer of at least 1 bytes HOT 1
- sas_devices: easy way to filter enclosure and drive
- AttributeError: 'SysfsAttributes' object has no attribute 'sas_address' HOT 2
- AttributeError: module 'collections' has no attribute 'MutableMapping'
- 0.3.12: test suite uses `nose` HOT 1
- Not found: '/sys/class/sas_host/host4/device/port-4:3/end_device-4:3/target4:0:3/4:0:3:0/scsi_generic/*[0-9]' HOT 3
- No issue: sg_ses now supports JSON output HOT 4
- 0.3.13 throws exception when listing the sas devices HOT 6
- sas_counters: add block device to phy counters when applicable
- sas_discover: filter non-printable characters HOT 2
- Intermittent missing symlinks with sas_mpath_snic_alias; possible timing issue? HOT 1
- Feature request: include SAS version in sas_discover output HOT 1
- .deb from mkdeb.sh: SyntaxError: invalid syntax HOT 2
- Add sg3_utils as a general requirement
- Create man pages HOT 1
- sas_counters: Fix exception when bay_identifier returns EINVAL
- sas_discover: unorderable types in Python 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sasutils.