[Release Note] ERPNext and Frappe Version 13.3.0

Updating customizations for Contact
/home/frappe/frappe-bench/apps/frappe/frappe/utils/formatters.py:81: DeprecationWarning: invalid escape sequence \<
  if not re.search("(\<br|\<div|\<p)", value):

Just to document - many deprecation warning messages related to inspect.getargspec():

/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
  if inspect.getargspec(module.get_context).args:
/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/pricing_rule/pricing_rule.py:155: DeprecationWarning: invalid escape sequence \w
  if self.condition and ("=" in self.condition) and re.match("""[\w\.:_]+\s*={1}\s*[\w\.@'"]+""", self.condition):
/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
  if inspect.getargspec(module.get_context).args:
/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
  if inspect.getargspec(module.get_context).args:
/home/frappe/frappe-bench/apps/frappe/frappe/www/app.py:37: DeprecationWarning: invalid escape sequence \<
  boot_json = re.sub("\<script[^<]*\</script\>", "", boot_json)
/home/frappe/frappe-bench/apps/frappe/frappe/www/app.py:40: DeprecationWarning: invalid escape sequence \>
  boot_json = re.sub("</script\>", "", boot_json)
/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()

getargspec causes deprecation. See this is at /apps/frappe/frappe__init__.py at line 1176 at the function -

def get_newargs(fn, kwargs):
    if hasattr(fn, 'fnargs'):
            fnargs = fn.fnargs
    else:
            try:
                    fnargs, varargs, varkw, defaults = inspect.getargspec(fn)
            except ValueError:
                    fnargs = inspect.getfullargspec(fn).args
                    varargs = inspect.getfullargspec(fn).varargs
                    varkw = inspect.getfullargspec(fn).varkw
                    defaults = inspect.getfullargspec(fn).defaults

    newargs = {}
    for a in kwargs:
            if (a in fnargs) or varkw:
                    newargs[a] = kwargs.get(a)

    newargs.pop("ignore_permissions", None)
    newargs.pop("flags", None)

    return newargs

Should replace inspect.getargspec with getfullargspec? at try. Is there a reason why inspect.getfullargspec is used in the exception but not in the try block?

@surajshetty Please check.

Same problem:

Installed Apps

ERPNext: v13.3.0 (version-13)

Frappe Framework: v13.3.0 (version-13)

$ snyk protect
Successfully applied Snyk patches

Done in 6.54s.
Done in 7.40s.
Patching sites…
/home/erpkrn/frappe-bench/apps/frappe/frappe/translate.py:635: DeprecationWarning: invalid escape sequence \s
translated_string = re.sub(’{\s?([0-9]+)\s?}’, “{\g<1>}”, t)
/home/erpkrn/frappe-bench/apps/frappe/frappe/translate.py:635: DeprecationWarning: invalid escape sequence \g
translated_string = re.sub(’{\s?([0-9]+)\s?}’, “{\g<1>}”, t)
/home/erpkrn/frappe-bench/apps/frappe/frappe/build.py:79: DeprecationWarning: invalid escape sequence ^
" refs/tags/,’ -e ‘s/^{}//’"
/home/erpkrn/frappe-bench/apps/frappe/frappe/build.py:429: DeprecationWarning: invalid escape sequence \s
content = re.sub("\s+", " “, content)
/home/erpkrn/frappe-bench/apps/frappe/frappe/model/naming.py:257: DeprecationWarning: invalid escape sequence \d
regex = “^{value}{separator}\d+$”.format(value=re.escape(value), separator=separator)
/home/erpkrn/frappe-bench/apps/frappe/frappe/core/doctype/data_import/importer.py:644: DeprecationWarning: invalid escape sequence \d
is_valid_duration = re.match(”^(?:(\d+d)?((^|\s)\d+h)?((^|\s)\d+m)?((^|\s)\d+s)?)$", value)
Migrating site1.local
/home/erpkrn/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py:101: DeprecationWarning: invalid escape sequence |
regex = re.compile(cstr(key).replace("|", “|”).replace("", "[\w]"))
/home/erpkrn/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py:101: DeprecationWarning: invalid escape sequence \w
regex = re.compile(cstr(key).replace("|", “|”).replace("", "[\w]"))
/home/erpkrn/frappe-bench/apps/frappe/frappe/core/doctype/file/file.py:915: DeprecationWarning: invalid escape sequence \s
content = re.sub(’<img[^>]src\s=\s*"’(.?)["’]’, _save_file, content)
/home/erpkrn/frappe-bench/apps/frappe/frappe/utils/file_manager.py:421: DeprecationWarning: invalid escape sequence \s
content = re.sub(’<img[^>]src\s=\s
"’(.?)["’]’, save_file, content)
Updating DocTypes for frappe : [================================= ] 84%/home/erpkrn/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py:679: DeprecationWarning: invalid escape sequence \W
if not re.match("^(?![\W])[^\d
\s][\w ]+$", name, flags):
/home/erpkrn/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py:967: DeprecationWarning: invalid escape sequence \w
re.match("""[\w.:_]+\s
={1}\s
[\w.@’"]+""", depends_on):
Updating DocTypes for frappe : [========================================] 100%
Updating DocTypes for erpnext : [========================================] 100%
Updating Dashboard for frappe
Updating Dashboard for erpnext
Updating customizations for Address
Updating customizations for Contact
/home/erpkrn/frappe-bench/apps/frappe/frappe/www/printview.py:412: DeprecationWarning: invalid escape sequence (
for at_import in list(set(re.findall("(@import url([^)]+)[;]?)", css))):
Building search index for site1.local
/home/erpkrn/frappe-bench/apps/erpnext/erpnext/accounts/doctype/pricing_rule/pricing_rule.py:155: DeprecationWarning: invalid escape sequence \w
if self.condition and ("=" in self.condition) and re.match("""[\w.:_]+\s
={1}\s*[\w.@’"]+""", self.condition):
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/www/app.py:37: DeprecationWarning: invalid escape sequence <
boot_json = re.sub("<script[^<]*</script>", “”, boot_json)
/home/erpkrn/frappe-bench/apps/frappe/frappe/www/app.py:40: DeprecationWarning: invalid escape sequence >
boot_json = re.sub("</script>", “”, boot_json)
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
/home/erpkrn/frappe-bench/apps/frappe/frappe/website/context.py:55: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
if inspect.getargspec(module.get_context).args:
$ bench build

1 Like

Any update, how we should update.

bench update works - just get some warnings. I do not believe they affect functionality.

@nabinhait It is like there is a bug on amending sales invoice with the following error in version 13.3.0:“Total Payment Amount in Payment Schedule must be equal to Grand / Rounded Total” when you want to re submit
When you import sales invoice same error does not allow the importation.
Note: This occurs in an instance migrated from version 12.
Help Pls

They affect being able to see genuine logged errors and newcomers panic at the sight of “so many errors!!!”

How do we need to solve this warning?

I did bench update --reset

I also did (bench update --reset), but after that I did ‘bench update’ and found same issue.

this is only a depreciation warning of a method won’t effect anything

@Joseph_Marie_Alba1 @MartinHBramwell @revant_one (sincerely sorry for tagging) any input

It affects being able to see genuine logged errors and newcomers panic at the sight of “so many errors!!!”

I much appreciate the great effort everyone is showing in our community.
I did the Bench update successfully, although an error "stating that node version =>14 required popped up during installation.

Since upgrade to 13.3.0 two issues emerged:
1- wkhtmltopdf HostNotFoundError when printing PDF.
2- After gladly testing the new RTL feature, i cant change the language back (of the administrator) from Arabic to English, an error message “invalid value can be unlimited or an integer value” screen capture attached. Even couldn’t create a new user the same error persist.

UPgrading from V12 to V13.

Versions:
frappe@VINOPROD01:~/frappe-bench$ npm --version
6.14.13
frappe@VINOPROD01:~/frappe-bench$ yarn --version
1.22.5
frappe@VINOPROD01:~/frappe-bench$ nodejs --version
v16.1.0
frappe@VINOPROD01:~/frappe-bench$ python --version
Python 2.7.17

Getting error on BENCH BUILD:
:heavy_check_mark: Built js/moment-bundle.min.js
internal/fs/utils.js:312
throw err;
^

Error: ENOENT: no such file or directory, open ‘/home/frappe/frappe-bench/apps/frappe/node_modules/localforage/dist/localforage.min.js’
at Object.openSync (fs.js:498:3)
at Object.readFileSync (fs.js:394:35)
at /home/frappe/frappe-bench/apps/frappe/rollup/build.js:129:39
at Array.map ()
at /home/frappe/frappe-bench/apps/frappe/rollup/build.js:123:36
at Array.forEach ()
at concatenate_files (/home/frappe/frappe-bench/apps/frappe/rollup/build.js:120:18)
at Object. (/home/frappe/frappe-bench/apps/frappe/rollup/build.js:40:13)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:933:32)
at Function.Module._load (internal/modules/cjs/loader.js:774:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
errno: -2,
syscall: ‘open’,
code: ‘ENOENT’,
path: ‘/home/frappe/frappe-bench/apps/frappe/node_modules/localforage/dist/localforage.min.js’
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

version 13 requires Python 3. You are still at Python 2.7

1 Like

Solved the second issue “invalid value can be unlimited or integer” by uninstalling app called erpnext_quota