meraki / dashboard-api-python

Official Dashboard API library (SDK) for Python
MIT License
290 stars 151 forks source link

Issues #131, #133 are back in release 1.6 #140

Closed jc516229 closed 3 years ago

jc516229 commented 3 years ago

Installing release 1.6 results in scripts failing with...

SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xae in position 284: invalid start byte

..in various places, when running on a Mac.

Looks like exactly the same issue as previously caused by inclusion of the ® character in the Open API spec.

TKIPisalegacycipher commented 3 years ago

Thanks for reporting this. Could you provide the full error text here please?

jasmah commented 3 years ago

Hi, I ran into the same issue with release 1.6.0

it looks like the errors are in the following files:

appliance.py - line 1482 - - allowedRules (array): Sets a list of specific SNORT� signatures to allow switch.py - line 1153 - - interfaceIp (string): The�IP address of the interface where the RP needs to be created. wireless.py - line 1154 - - mandatoryDhcpEnabled (boolean): If true, Mandatory DHCP will enforce that clients connecting to this SSID must use the IP address assigned by the DHCP server. Clients who use a static IP address won�t be able to associate.

File "/lib/python3.8/site-packages/meraki/api/appliance.py", line 1477 """ ^ SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xae in position 284: invalid start byte

Thanks

PackeTsar commented 3 years ago

Getting the same thing here

(env) ~/Dev/meraki-cli$ python3
Python 3.9.1 (v3.9.1:1e5d33e9b9, Dec  7 2020, 12:10:52) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import meraki
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/jkerns/Dev/meraki-cli/env/lib/python3.9/site-packages/meraki/__init__.py", line 5, in <module>
    from .rest_session import *
  File "/Users/jkerns/Dev/meraki-cli/env/lib/python3.9/site-packages/meraki/rest_session.py", line 13, in <module>
    from .__init__ import __version__
  File "/Users/jkerns/Dev/meraki-cli/env/lib/python3.9/site-packages/meraki/__init__.py", line 9, in <module>
    from .api.appliance import Appliance
  File "/Users/jkerns/Dev/meraki-cli/env/lib/python3.9/site-packages/meraki/api/appliance.py", line 1483
    """
       ^
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xae in position 284: invalid start byte
>>> 
TKIPisalegacycipher commented 3 years ago

Looks like you're having this on macOS, based on the darwin kernel. Thanks for reporting, will be fixed soon.

TKIPisalegacycipher commented 3 years ago

Fixed in https://github.com/meraki/dashboard-api-python/commit/c9928d646b51a1ab25d680732d038af3240c058a