My Oracle Support Banner

How to solve an GFv3 pkg Toolkit AttributeError: 'NoneType' Object Has No Attribute 'encode' (Doc ID 1496207.1)

Last updated on JULY 31, 2018

Applies to:

Oracle GlassFish Server - Version 3.0.1 to 3.1.2 [Release 3.0 to 3.1]
Information in this document applies to any platform.


The Goal is to resolve the error message: "AttributeError: 'NoneType' object has no attribute 'encode' " that is observed when trying to execute the Glassfish pkg toolkit command.

For example when we try to set a new publisher, or try to list existing publishers, an error stack can be seen like

$ ./pkg -R /opt/GFv31-fcs set-publisher -Pe -O http://localhost:6666 release.glassfish.localhost
Traceback (most recent call last):
  File "/opt/GFv31-fcs/pkg/bin/", line 2621, in handle_errors
  __ret = func(*args, **kwargs)
  File "/opt/GFv31-fcs/pkg/bin/", line 2577, in main_func
  return publisher_set(img, mydir, pargs)
  File "/opt/GFv31-fcs/pkg/bin/", line 1823, in publisher_set
  File "/opt/GFv31-fcs/pkg/vendor-packages/pkg/client/", line 1231, in add_publisher
  File "/opt/GFv31-fcs/pkg/vendor-packages/pkg/client/", line 592, in add_publisher
  File "/opt/GFv31-fcs/pkg/vendor-packages/pkg/client/", line 272, in save_config
  File "/opt/GFv31-fcs/pkg/vendor-packages/pkg/client/", line 236, in write
AttributeError: 'NoneType' object has no attribute 'encode'



To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.