Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Encoding Problem #14

Open
waqasraz opened this issue Jul 5, 2018 · 4 comments
Open

Encoding Problem #14

waqasraz opened this issue Jul 5, 2018 · 4 comments
Assignees
Milestone

Comments

@waqasraz
Copy link

waqasraz commented Jul 5, 2018

I think the issue I open for async ssh fits here because #I am using this to fetch the output.

ronf/asyncssh#154

@waqasraz
Copy link
Author

waqasraz commented Jul 7, 2018

I need some help with this issue, please if anyone has any idea.

@selfuryon selfuryon self-assigned this Jul 8, 2018
@selfuryon
Copy link
Owner

Hello!
No problem! I will try to help! Can you provide information about your Juniper router? Version? Model? I find out that we recognize the place where you have a problem. Did you try to change comment? Maybe repeat to type 'n' again? Maybe this 'n' letter not from english by mistake?

@waqasraz
Copy link
Author

waqasraz commented Jul 8, 2018

Hi, Thank you, Actually, I was able to have some idea about the problem. In some of the routers, engineers added some Unicode characters in the descriptions. So when we try to decode it using UTF-8 it just gets the decode error. Thank you for the good work in the library.

Just on a side note

_pattern = r"\w+(\@[\-\w]*)?[{}]"

this pattern returns partial juniper output as I've tested show configurations on many routers. This one works fine

_pattern = r"\w+(\@[\-\w]*)"

@selfuryon selfuryon added this to the Release v1.0 milestone Dec 23, 2018
@wallies
Copy link

wallies commented Nov 21, 2019

@waqasraz we had similiar issue to this and we solved it by using this
codecs.register_error('strict', codecs.backslashreplace_errors)
https://docs.python.org/2/library/codecs.html

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants