I'm having issues updating an SSID for a nertwork

Solved
jeffsto
Here to help

I'm having issues updating an SSID for a nertwork

Hi.  I'm trying to use the library "updateNetworkWirelessSsid" to update an SSID name.  I keep getting the error "Message: 'quote_from_bytes() expected bytes'" when I run the following.

 

1st I get the networks and pass each network to a addnetworkssid class I created

mymeraki.getnetworks(MYID)
for network in mymeraki.networksbynum:
for mernetworkdict in mymeraki.networksbynum[network]:
mymeraki.addnetworkssid(newssid,mernetworkdict)

 2nd in the class I get the SSID info for each network I pass to it

def addnetworkssid(self,newssid,mernetworkdict):
self.newssid = newssid
self.mernetworkdict = mernetworkdict
self.existingssids = self.getnetworkssids(self.mernetworkdict['id'])

 Then I loop the SSIDs looking for the name "unconfigured".  When I find it, I try to update the name

for ssids in self.existingssids:
if re.search('Unconfigured SSID',ssids['name']):
ssids.update({'name':newssid})
try:
self.response = self.dashboard.wireless.updateNetworkWirelessSsid(self.mernetworkdict['id'],**ssids) # execute the API
return

 

1 Accepted Solution
jeffsto
Here to help

I was able to resolve this.  I had to send the meraki ID as a string however that wasn't the error I was getting so it wasn't clear.  Trial and error got me to my fix.

View solution in original post

2 Replies 2
jeffsto
Here to help

If anyone is using this library and would just like to pass along how you're using it, that would also be welcome.  When I try to use the code example, I get an error that says that 3 arguments are required but 4 are provided.  

jeffsto
Here to help

I was able to resolve this.  I had to send the meraki ID as a string however that wasn't the error I was getting so it wasn't clear.  Trial and error got me to my fix.

Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.