rueckstiess / mtools

A collection of scripts to set up MongoDB test environments and parse and visualize MongoDB log files.
Apache License 2.0
1.88k stars 403 forks source link

mloginfo: TypeError: Object of type 'bytes' is not JSON serializable #684

Closed gonace closed 4 years ago

gonace commented 5 years ago

Trying to run "mloginfo mongod.log-20190301 --queries"

Actual/current behavior

gonace@ubuntu:~/Desktop/mongod$ mloginfo mongod.log-20190301 --queries
     source: mongod.log-20190301
       host: unknown
      start: 2019 Feb 28 03:34:02.004
        end: 2019 Mar 01 03:11:50.841
date format: iso8601-local
     length: 145226
     binary: unknown
    version: >= 3.0 (iso8601 format, level, component)
    storage: unknown

QUERIES
 [====                                    ] 10.3 % Traceback (most recent call last):
  File "/usr/local/bin/mloginfo", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/mtools/mloginfo/mloginfo.py", line 95, in main
    tool.run()
  File "/usr/local/lib/python3.6/dist-packages/mtools/mloginfo/mloginfo.py", line 90, in run
    section.run()
  File "/usr/local/lib/python3.6/dist-packages/mtools/mloginfo/sections/query_section.py", line 81, in run
    pattern=le.pattern, duration=le.duration)
  File "/usr/local/lib/python3.6/dist-packages/mtools/util/logevent.py", line 439, in pattern
    self._pattern = self._find_pattern('filter: ')
  File "/usr/local/lib/python3.6/dist-packages/mtools/util/logevent.py", line 769, in _find_pattern
    return json2pattern(search_str)
  File "/usr/local/lib/python3.6/dist-packages/mtools/util/pattern.py", line 88, in json2pattern
    return json.dumps(doc, sort_keys=True, separators=(', ', ': '))
  File "/usr/lib/python3.6/json/__init__.py", line 238, in dumps
    **kw).encode(obj)
  File "/usr/lib/python3.6/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python3.6/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib/python3.6/json/encoder.py", line 180, in default
    o.__class__.__name__)
TypeError: Object of type 'bytes' is not JSON serializable

Environment

Software Version
mtools 1.5.3
Python 3.6.7
MongoDB server 3.6.9
Operating system Ubuntu 18.04.2 LTS
stennie commented 5 years ago

@gonace Can you share a snippet of log file that triggers this issue?

Thanks, Stennie

supersujj commented 5 years ago

I have the same problem.

stennie commented 5 years ago

@supersujj Can you share a snippet of log file that causes this issue for you? Can you also confirm the output of mloginfo --version? On #681 your trace included Python 3.7, which might be a different issue since this report is Python 3.6.7.

If you are indeed using Python 3.7, please create a new issue with relevant details for your environment so we can keep details of the investigation distinct.

Thanks, Stennie

supersujj commented 5 years ago

@stennie /usr/local/python3/bin/mloginfo --version mtools version 1.5.3 || Python 3.6.4 (default, Mar 7 2019, 10:30:50) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)]

stennie commented 5 years ago

@supersujj Is there a log snippet you can share? The encoding error is related to something in your log file so I need a sample of log lines in order to reproduce & investigate the issue.

The output of python3 -m locale may also be helpful.

Thanks, Stennie

supersujj commented 5 years ago

@stennie Locale aliasing:

Locale defaults as determined by getdefaultlocale():

Language: en_US Encoding: UTF-8

Locale settings on startup:

LC_CTYPE ... Language: en_US Encoding: UTF-8

LC_TIME ... Language: (undefined) Encoding: (undefined)

LC_COLLATE ... Language: (undefined) Encoding: (undefined)

LC_MONETARY ... Language: (undefined) Encoding: (undefined)

LC_MESSAGES ... Language: (undefined) Encoding: (undefined)

LC_NUMERIC ... Language: (undefined) Encoding: (undefined)

Locale settings after calling resetlocale():

LC_CTYPE ... Language: en_US Encoding: UTF-8

LC_TIME ... Language: en_US Encoding: UTF-8

LC_COLLATE ... Language: en_US Encoding: UTF-8

LC_MONETARY ... Language: en_US Encoding: UTF-8

LC_MESSAGES ... Language: en_US Encoding: UTF-8

LC_NUMERIC ... Language: en_US Encoding: UTF-8

Locale settings after calling setlocale(LC_ALL, ""):

LC_CTYPE ... Language: en_US Encoding: UTF-8

LC_TIME ... Language: en_US Encoding: UTF-8

LC_COLLATE ... Language: en_US Encoding: UTF-8

LC_MONETARY ... Language: en_US Encoding: UTF-8

LC_MESSAGES ... Language: en_US Encoding: UTF-8

LC_NUMERIC ... Language: en_US Encoding: UTF-8

Number formatting:

123,456,789 is 123456789 3.14 is 3.14

stennie commented 5 years ago

@supersujj Thanks for the locale info. Are you able to share a log snippet so I can try to reproduce the issue?

Regards, Stennie

supersujj commented 5 years ago

@stennie /usr/local/python3/bin/mloginfo 60shard1.log --queries source: 60shard1.log host: unknown start: 2019 Mar 06 00:00:31.097 end: 2019 Mar 07 00:00:30.809 date format: iso8601-local length: 36893 binary: unknown version: >= 3.0 (iso8601 format, level, component) storage: unknown

QUERIES [ ] 0.0 % Traceback (most recent call last): File "/usr/local/python3/bin/mloginfo", line 11, in load_entry_point('mtools==1.5.3', 'console_scripts', 'mloginfo')() File "/usr/local/python3/lib/python3.6/site-packages/mtools/mloginfo/mloginfo.py", line 95, in main tool.run() File "/usr/local/python3/lib/python3.6/site-packages/mtools/mloginfo/mloginfo.py", line 90, in run section.run() File "/usr/local/python3/lib/python3.6/site-packages/mtools/mloginfo/sections/query_section.py", line 81, in run pattern=le.pattern, duration=le.duration) File "/usr/local/python3/lib/python3.6/site-packages/mtools/util/logevent.py", line 437, in pattern self._pattern = self._find_pattern('query: ') File "/usr/local/python3/lib/python3.6/site-packages/mtools/util/logevent.py", line 769, in _find_pattern return json2pattern(search_str) File "/usr/local/python3/lib/python3.6/site-packages/mtools/util/pattern.py", line 88, in json2pattern return json.dumps(doc, sort_keys=True, separators=(', ', ': ')) File "/usr/local/python3/lib/python3.6/json/init.py", line 238, in dumps **kw).encode(obj) File "/usr/local/python3/lib/python3.6/json/encoder.py", line 199, in encode chunks = self.iterencode(o, _one_shot=True) File "/usr/local/python3/lib/python3.6/json/encoder.py", line 257, in iterencode return _iterencode(o, 0) File "/usr/local/python3/lib/python3.6/json/encoder.py", line 180, in default o.class.name) TypeError: Object of type 'bytes' is not JSON serializable

thanks for help!

supersujj commented 5 years ago

@stennie thanks for help! 60shard1.log 2019-03-06T00:00:31.097+0800 I CONTROL [conn1242569] pid=16905 port=27021 64-bit host=ali-szvpc1-mongodb-192-1 68-169-60.ux168.cn 2019-03-06T00:00:31.097+0800 I CONTROL [conn1242569] db version v3.4.9 2019-03-06T00:00:31.097+0800 I CONTROL [conn1242569] git version: 876ebee8c7dd0e2d992f36a848ff4dc50ee6603e 2019-03-06T00:00:31.097+0800 I CONTROL [conn1242569] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013 2019-03-06T00:00:31.097+0800 I CONTROL [conn1242569] allocator: tcmalloc 2019-03-06T00:00:31.097+0800 I CONTROL [conn1242569] modules: none 2019-03-06T00:00:31.097+0800 I CONTROL [conn1242569] build environment: 2019-03-06T00:00:31.097+0800 I CONTROL [conn1242569] distmod: rhel70 2019-03-06T00:00:31.097+0800 I CONTROL [conn1242569] distarch: x86_64 2019-03-06T00:00:31.097+0800 I CONTROL [conn1242569] target_arch: x86_64 2019-03-06T00:00:31.097+0800 I CONTROL [conn1242569] options: { config: "/usr/local/mongodb/config/shard1.cnf" , net: { port: 27021 }, processManagement: { fork: true, pidFilePath: "/data/mongodb/shard1/shard1.pid" }, repl ication: { oplogSizeMB: 5120, replSetName: "shard1_zxl", secondaryIndexPrefetch: "all" }, security: { authoriza tion: "enabled", clusterAuthMode: "keyFile", keyFile: "/usr/local/mongodb/keyfile/keyfile" }, sharding: { clust erRole: "shardsvr" }, storage: { dbPath: "/data/mongodb/shard1", directoryPerDB: true, engine: "wiredTiger", jo urnal: { enabled: true }, wiredTiger: { collectionConfig: { blockCompressor: "zlib" }, engineConfig: { cacheSiz eGB: 50.0, directoryForIndexes: true, journalCompressor: "zlib" }, indexConfig: { prefixCompression: true } } } , systemLog: { destination: "file", logAppend: true, path: "/usr/local/mongodb/logs/shard1.log" } } 2019-03-06T00:00:31.102+0800 I - [conn1242569] end connection 192.168.169.63:34684 (345 connections now open) 2019-03-06T00:00:31.955+0800 I ACCESS [conn1202362] Successfully authenticated as principal mms on admin 2019-03-06T00:00:32.302+0800 I - [conn1242564] end connection 192.168.169.62:32868 (344 connections now open) 2019-03-06T00:00:32.820+0800 I - [conn1242565] end connection 192.168.169.60:36174 (343 connections now open) 2019-03-06T00:00:32.966+0800 I - [conn1242566] end connection 192.168.169.60:36176 (342 connections now open) 2019-03-06T00:00:34.488+0800 I COMMAND [conn1242090] command abc.123 command: find { find: "123", filter: { sellerId: "uk.deal", key: { $in: [ "382181520295-2648820577614-2019-03-03T03 :35:31.000Z-FeeFinalValue", "162652093179-2648890675714-2019-03-03T05:32:28.000Z-FeeAd", "162652093179-26488902 57914-2019-03-03T05:32:30.000Z-FeeFinalValue", "382440302942-2649114756414-2019-03-03T10:34:19.000Z-FeeFinalVal ue", "382440302942-2649117090514-2019-03-03T10:34:19.000Z-FeeAd", "152854210592-2649125755914-2019-03-03T10:44: 43.000Z-FeeFinalValue", "382736894101-2649154581714-2019-03-03T11:13:29.000Z-FeeFinalValue", "162560105946-2649 155543714-2019-03-03T11:14:31.000Z-FeeFinalValue", "153131641268-2649183646714-2019-03-03T11:41:20.000Z-FeeFina lValue", "382477930802-2649210170014-2019-03-03T12:07:52.000Z-FeeFinalValue", "153131640800-2649245205114-2019- 03-03T12:43:04.000Z-FeeFinalValue", "153131640207-2649245229314-2019-03-03T12:43:05.000Z-FeeFinalValue", "16319 2765513-2649276229814-2019-03-03T13:12:40.000Z-FeeFinalValue", "153319206460-2649278946114-2019-03-03T13:15:29. 000Z-FeeFinalValue", "163110874029-2649322710514-2019-03-03T13:56:43.000Z-FeeFinalValue", "162891010925-2649413 892314-2019-03-03T15:11:07.000Z-FeeAd", "162891010925-2649411382114-2019-03-03T15:11:08.000Z-FeeFinalValue", "3 82127665299-2649447137814-2019-03-03T15:38:53.000Z-FeeAd", "382127665299-2649444696214-2019-03-03T15:38:54.000Z -FeeFinalValue", "162718299219-2649464198714-2019-03-03T15:52:35.000Z-FeeAd", "162718299219-2649461212514-2019- 03-03T15:52:37.000Z-FeeFinalValue", "162209794794-2649511442314-2019-03-03T16:29:11.000Z-FeeFinalValue", "16277 2244654-2649565811514-2019-03-03T17:06:17.000Z-FeeFinalValue", "382190046672-2649593922314-2019-03-03T17:23:42. 000Z-FeeFinalValue", "152807396131-2649595846614-2019-03-03T17:24:57.000Z-FeeFinalValue", "153223796434-2649600 079914-2019-03-03T17:27:47.000Z-FeeFinalValue", "382332808810-2649602338314-2019-03-03T17:29:37.000Z-FeeFinalVa lue", "163340763751-2649699269414-2019-03-03T18:30:38.000Z-FeeFinalValue", "382699024049-2649763011814-2019-03- 03T19:20:29.000Z-FeeFinalValue", "382203307716-2649771501714-2019-03-03T19:27:13.000Z-FeeFinalValue", "15266590 5201-2649777966914-2019-03-03T19:32:03.000Z-FeeFinalValue", "152933842555-2649778938114-2019-03-03T19:32:52.000 Z-FeeFinalValue", "152933842750-2649778938314-2019-03-03T19:32:52.000Z-FeeFinalValue", "152784377244-2649782779 814-2019-03-03T19:36:25.000Z-FeeFinalValue", "152719382198-2649792867614-2019-03-03T19:46:00.000Z-FeeFinalValue ", "382336660944-2649796274614-2019-03-03T19:49:22.000Z-FeeFinalValue", "153117603692-2649856222714-2019-03-03T 20:41:56.000Z-FeeFinalValue", "152739067996-2649860427514-2019-03-03T20:45:48.000Z-FeeFinalValue", "38225030531 9-2649890574414-2019-03-03T21:14:38.000Z-FeeFinalValue", "153288173370-2649925360414-2019-03-03T21:50:51.000Z-F eeFinalValue", "162746841441-2649937715814-2019-03-03T22:04:20.000Z-FeeFinalValue", "152872423873-2649941386014 -2019-03-03T22:07:25.000Z-FeeAd", "152872423873-2649940488814-2019-03-03T22:07:26.000Z-FeeFinalValue", "1527820 10803-2649941336914-2019-03-03T22:08:29.000Z-FeeFinalValue", "163385758564-2649944211414-2019-03-03T22:10:33.00 0Z-FeeAd", "163385758564-2649943114714-2019-03-03T22:10:34.000Z-FeeFinalValue", "382249398252-2649967907314-201 9-03-03T22:32:14.000Z-FeeFinalValue", "382219842318-2650011619514-2019-03-03T23:16:21.000Z-FeeFinalValue", "382 219673179-2650013507214-2019-03-03T23:18:20.000Z-FeeFinalValue", "162660952181-2650014349114-2019-03-03T23:19:2 3.000Z-FeeFinalValue", "162859836219-2650025174714-2019-03-03T23:33:43.000Z-FeeFinalValue", "163318418266-25644 88477314-2019-03-04T02:32:17.000Z-CreditFinalValue", "152761347360-2523385050714-2019-03-04T02:38:30.000Z-Credi tFinalValue", "162727479178-2523385049014-2019-03-04T03:00:50.000Z-CreditFinalValue", "162556880139-25612384341 14-2019-03-04T03:04:41.000Z-CreditFinalValue", "382415546602-2548435635414-2019-03-04T03:06:15.000Z-CreditFinal Value", "153111067913-2650233939114-2019-03-04T03:54:45.000Z-FeeFinalValue", "152292285573-2650282431814-2019-0 3-04T05:25:15.000Z-FeeFinalValue", "152721668242-2650371062014-2019-03-04T07:54:53.000Z-FeeFinalValue", "382568 532445-2650377105914-2019-03-04T08:03:23.000Z-FeeFinalValue", "382338467295-2650381947314-2019-03-04T08:11:39.0 00Z-FeeAd", "382338467295-2650381290014-2019-03-04T08:11:40.000Z-FeeFinalValue", "152868403974-2650452961614-20 19-03-04T09:29:51.000Z-FeeFinalValue", "152859316105-2650464744414-2019-03-04T09:39:25.000Z-FeeFinalValue", "15 2885626099-2650476727614-2019-03-04T09:49:51.000Z-FeeAd", "152885626099-2650475048214-2019-03-04T09:49:52.000Z- FeeFinalValue", "382552059094-2650509845414-2019-03-04T10:20:16.000Z-FeeFinalValue", "162717127665-265052502471 4-2019-03-04T10:35:45.000Z-FeeFinalValue", "162652093887-2650538153514-2019-03-04T10:49:11.000Z-FeeFinalValue", "162179142282-2650553553214-2019-03-04T11:03:08.000Z-FeeFinalValue", "162681803377-2650553553314-2019-03-04T11 :03:08.000Z-FeeFinalValue", "153156877165-2650553556714-2019-03-04T11:03:09.000Z-FeeFinalValue", "152248644786- 2650553558214-2019-03-04T11:03:09.000Z-FeeFinalValue", "381737836556-2650553558314-2019-03-04T11:03:09.000Z-Fee FinalValue", "153239205210-2650553559514-2019-03-04T11:03:09.000Z-FeeFinalValue", "381748008971-2650553562614-2 019-03-04T11:03:09.000Z-FeeFinalValue", "381731674786-2650553563914-2019-03-04T11:03:09.000Z-FeeFinalValue", "3 82279006922-2650566664014-2019-03-04T11:12:58.000Z-FeeAd", "382279006922-2650564319514-2019-03-04T11:13:00.000Z -FeeFinalValue", "382263299538-2650657280014-2019-03-04T12:36:22.000Z-FeeAd", "382263299538-2650656024514-2019- 03-04T12:36:24.000Z-FeeFinalValue", "162715508015-2650675690014-2019-03-04T12:55:33.000Z-FeeFinalValue", "16282 4278111-2650723152614-2019-03-04T13:32:53.000Z-FeeFinalValue", "162875874050-2650732531714-2019-03-04T13:41:25. 000Z-FeeFinalValue", "162171044030-2650734603314-2019-03-04T13:43:01.000Z-FeeFinalValue", "382626602032-2650754 269814-2019-03-04T13:57:38.000Z-FeeFinalValue", "382417257920-2650771319514-2019-03-04T14:12:45.000Z-FeeFinalVa lue", "382417257920-2650774041114-2019-03-04T14:12:45.000Z-FeeAd", "162717127657-2650778155714-2019-03-04T14:18 :21.000Z-FeeFinalValue", "153148214618-2650783218314-2019-03-04T14:23:48.000Z-FeeFinalValue", "153092800045-265 0849649214-2019-03-04T15:04:46.000Z-FeeFinalValue", "163213755573-2650851206614-2019-03-04T15:06:25.000Z-FeeFin alValue", "152859486557-2650898250514-2019-03-04T15:37:50.000Z-FeeFinalValue", "382283802202-2650924285314-2019 -03-04T15:53:00.000Z-FeeFinalValue", "163338933123-2650944803014-2019-03-04T16:07:18.000Z-FeeFinalValue", "1528 44580196-2650953652614-2019-03-04T16:14:19.000Z-FeeFinalValue", "162833704115-2650970567014-2019-03-04T16:25:21 .000Z-FeeAd", "162833704115-2650969386914-2019-03-04T16:25:23.000Z-FeeFinalValue", "163245098340-2650975642014- 2019-03-04T16:30:33.000Z-FeeFinalValue", "382497752127-2650979543114-2019-03-04T16:33:28.000Z-FeeFinalValue", " 152861978481-2651004580414-2019-03-04T16:56:08.000Z-FeeFinalValue", "162192250049-2651007678514-2019-03-04T16:5 8:50.000Z-FeeFinalValue", "382463083524-2651026519914-2019-03-04T17:14:41.000Z-FeeFinalValue", "382351752243-26 51029083714-2019-03-04T17:17:09.000Z-FeeFinalValue", "153096952228-2651094585214-2019-03-04T18:03:16.000Z-FeeFi nalValue", "162652168613-2651096410814-2019-03-04T18:04:51.000Z-FeeFinalValue", "152712002340-2651098389714-201 9-03-04T18:06:27.000Z-FeeFinalValue", "162556879786-2651103250214-2019-03-04T18:10:48.000Z-FeeFinalValue", "382 477876173-2651151491814-2019-03-04T18:41:01.000Z-FeeFinalValue", "162959082949-2651162110414-2019-03-04T18:50:4 5.000Z-FeeFinalValue", "382227850192-2651175190414-2019-03-04T19:03:11.000Z-FeeFinalValue", "382196966480-26512 12700214-2019-03-04T19:36:28.000Z-FeeFinalValue", "162634249283-2651215532714-2019-03-04T19:38:58.000Z-FeeFinal Value", "162842674878-2651258650914-2019-03-04T20:19:38.000Z-FeeAd", "162842674878-2651257487914-2019-03-04T20: 19:40.000Z-FeeFinalValue", "162932261052-2651263872914-2019-03-04T20:25:53.000Z-FeeFinalValue", "382420616257-2 651277588114-2019-03-04T20:37:37.000Z-FeeFinalValue", "162216555455-2651340083014-2019-03-04T21:35:25.000Z-FeeF inalValue", "162845920749-2651346458014-2019-03-04T21:41:34.000Z-FeeFinalValue", "162845923313-2651368751014-20 19-03-04T22:05:06.000Z-FeeFinalValue", "152859486461-2651387598014-2019-03-04T22:27:34.000Z-FeeFinalValue", "16 3334714624-2651412112314-2019-03-04T22:56:39.000Z-FeeFinalValue", "163318289464-2651418858314-2019-03-04T23:02: 48.000Z-FeeFinalValue", "153131695623-2651428150914-2019-03-04T23:14:07.000Z-FeeFinalValue", "152897646473-2651 441007414-2019-03-04T23:33:06.000Z-FeeFinalValue", "381859992042-2651445734214-2019-03-04T23:39:01.000Z-FeeAd", "381859992042-2651444965014-2019-03-04T23:39:02.000Z-FeeFinalValue", "382219842643-2651453166614-2019-03-04T23 :50:29.000Z-FeeFinalValue" ] } }, projection: { $sortKey: { $meta: "sortKey" } }, sort: { _id: -1 }, shardVersi on: [ Timestamp 0|0, ObjectId('000000000000000000000000') ] } planSummary: IXSCAN { key: "hashed" } keysExamine d:179 docsExamined:51 hasSortStage:1 cursorExhausted:1 numYields:6 nreturned:51 reslen:43698 locks:{ Global: { acquireCount: { r: 14 } }, Database: { acquireCount: { r: 7 } }, Collection: { acquireCount: { r: 7 } } } proto col:op_command 133ms

sreehari22 commented 5 years ago

I have same problem . Please let me know any solution for the above issue

sreehari22 commented 5 years ago

@stennie i have same issue and please let me know the solution

xxxxxx-MacBook-Pro:Library xxxxxx$ mloginfo --queries --no-progressbar /Users/xxxx/Downloads/xxxxxxxx2019-05-24T07_00_00_2019-05-25T07_00_00_mongodb.log source: /Users/xxxxxx/Downloads/xxxxxxxxxxxt_2019-05-24T07_00_00_2019-05-25T07_00_00_mongodb.log host: unknown start: 2019 May 24 06:57:24.795 end: 2019 May 25 03:57:13.518 date format: iso8601-local length: 51728 binary: unknown version: >= 3.0 (iso8601 format, level, component) storage: unknown

QUERIES Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/bin/mloginfo", line 10, in sys.exit(main()) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/mtools/mloginfo/mloginfo.py", line 95, in main tool.run() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/mtools/mloginfo/mloginfo.py", line 90, in run section.run() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/mtools/mloginfo/sections/query_section.py", line 81, in run pattern=le.pattern, duration=le.duration) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/mtools/util/logevent.py", line 439, in pattern self._pattern = self._find_pattern('filter: ') File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/mtools/util/logevent.py", line 769, in _find_pattern return json2pattern(search_str) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/mtools/util/pattern.py", line 88, in json2pattern return json.dumps(doc, sort_keys=True, separators=(', ', ': ')) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/init.py", line 238, in dumps **kw).encode(obj) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/encoder.py", line 199, in encode chunks = self.iterencode(o, _one_shot=True) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/encoder.py", line 257, in iterencode return _iterencode(o, 0) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/encoder.py", line 180, in default o.class.name) TypeError: Object of type 'bytes' is not JSON serializable

sreehari22 commented 5 years ago

@stennie Mloginfo version

mtools version 1.5.3 || Python 3.6.8 (v3.6.8:3c6b436a57, Dec 24 2018, 02:04:31) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]

stennie commented 5 years ago

I have same problem . Please let me know any solution for the above issue

@sreehari22 Not sure on the solution yet (which is why this issue is still open).

Can you provide a gist or pastebin link with a log file I can test with? An example in an earlier comment was mangled by GitHub formatting.

Thanks, Stennie

stennie commented 4 years ago

@supersujj @sreehari22 Unfortunately I still don't have a usable log snippet to try to repro this issue. If someone can provide a gist or pastebin link with a log file that would be helpful (GitHub unfortunately changes the line wrapping for inline logs).

There were also a number of changes for mtools 1.6.0, so it would be worth retesting to see if that happens to fix your issue.

Thanks, Stennie