Open TPSreports2020 opened 8 months ago
I upgraded to 4.3.0 and still get same output
The same issue with my ruckus access point dirty hack to make it work (I removed set_base_prompt from session_preparation and made enable method to brute force login (I retry it in case help is not shown))
from retry import retry
class RuckusSHH(RuckusFastironSSH): def session_preparation(self) -> None: """FastIron requires to be enable mode to disable paging.""" self._test_channel_read() self.enable() self.disable_paging(command="skip-page-display")
time.sleep(0.3 * self.global_delay_factor)
self.clear_buffer()
@retry(Exception, tries=5)
def enable(
self,
cmd: str = "enable",
pattern: str = "",
enable_pattern: Optional[str] = None,
check_state: bool = True,
re_flags: int = re.IGNORECASE,
) -> str:
self.read_until_prompt_or_pattern(
pattern="Please login:", re_flags=re_flags, read_entire_line=True, read_timeout=1)
self.write_channel(self.normalize_cmd(self.username))
time.sleep(1)
self.read_until_prompt_or_pattern(
pattern="password:", re_flags=re_flags, read_entire_line=True, read_timeout=1)
self.write_channel(self.normalize_cmd(self.secret))
time.sleep(1)
return self.send_command("help", read_timeout=1)
Maybe it will be helpful until netmiko creates proper fix.
@TPSreports2020 It looks like Netmiko is failing on this enable()
call here:
https://github.com/ktbyers/netmiko/blob/develop/netmiko/ruckus/ruckus_fastiron.py#L17
I would probably try turning on Netmiko logging and see if that gives us more clues.
Either that or enable the Netmiko session_log.
The None Type concatenation error just means None was returned in a context when a string was expected, but we need to figure out why that happened.
Is this a FastIron switch or is this an access-point?
It is possible that Netmiko is failing to properly identify the base_prompt
and this is causing a failure later on.
I found that if I keep running it, sometimes it works, but not sure why.. Here are the log files for a time where it worked and a time it failed.
Same randomly appearing issue here, too, with fastiron.
Description of Issue/Question
I have some super basic code that used to work and now it always returns "TypeError: can only concatenate str (not "NoneType") to str" - I have tried adding longer read_timeout values and explicitly adding expect_string=r"#", but I understand that this is already set for ruckus_fastiron?
Setup
Netmiko version
Netmiko device_type (if relevant to the issue)
(Paste
device_type
between quotes below)Steps to Reproduce the Issue
Error Traceback
(Paste the complete traceback of the exception between quotes below)
Relevant Python code
(Please try to essentialize your Python code to the minimum code needed to reproduce the issue) (Paste the code between the quotes below)
I also get the same output if I just run :