bernd-wechner / Degoo

CLI tool(s) for working with Degoo cloud storage
Other
143 stars 41 forks source link

degoo_ll: int() argument must be a string, a bytes-like object or a number, not 'NoneType' #8

Closed cweijden closed 3 years ago

cweijden commented 3 years ago

Got this generic issue: most of the commands give the same error 'int() argument must be a string, a bytes-like object or a number, not 'NoneType''

Some misconfiguration (by me)?

bernd-wechner commented 3 years ago

Check that you're using Python 3.9 but it might well be that this relates to https://github.com/bernd-wechner/Degoo/issues/7 and is fixed.

Otherwise I hope if it bombs with int() argument must be a string, a bytes-like object or a number, not 'NoneType'. that it also dumps a stack trace and line number, and if you can share that we can pin down where it's failing.

It's a reverse engineering job and hence based on what I can see watxhing the Degoo web interface do it's thing and most definitely a work in progress. Any field experience with different configs is useful, thanks.

There is a real chance it's been fixed with: https://github.com/bernd-wechner/Degoo/commit/92ae25735201d546db460d684a7b1172df97f773

But maybe not.

bernd-wechner commented 3 years ago

Typo fixed in: https://github.com/bernd-wechner/Degoo/commit/892c9bfa3e9eb6af1fe9241c24eaa51c55c6cbe9

Thanks.

cweijden commented 3 years ago

I was using Python 3.8.5 at first. I have tested your Jan 15 commit again using Python 3.9 (using the recommended modules), which however gave the same generic message that opened this issue. Unfortunately without traceback/line number, so no quick pointer to the cause.

Subsequently I pulled your latest commit and rebuild the commands (fixing the typo on degoo_login was a convenient check). Now the initially complaining commands (tested 'cd', 'ls', 'll', 'mkdir', 'rm', 'path') give output as expected, both with Python 3.8.5 and 3.9.

Seems that the #7 fix is fixing this too. Thanks!

bernd-wechner commented 3 years ago

Strange that it offers no stack trace. I'm guessing form above it's fixed now and we can close this? If perchance I misunderstood that I'd love to see coy/paste form a terminal interaction. Akin to this:

$ ./degoo_pwd
Working Directory is /Web/Backup
$ ./degoo_ls
Alices Restaurant (M).mp4
Image 1.png
$ ./degoo_ll
14239196069 Video       Alices Restaurant (M).mp4   c:2016-08-09 04:05:26   m:2021-01-15 11:23:32   u:2021-01-15 11:23:32
14238958266 Image       Image 1.png                 c:2019-03-18 08:05:08   m:2021-01-15 10:28:53   u:2021-01-15 10:28:53

which is just a sample I took form my PC now. Such screen copy/pastes (from a text terminal) say so much so unambigoulsy when compared to a paraphrasal generally.

Of course if I understood right the fix to issue 7 fixed this one.

There have basically been two issues reported, one to do with the configs as none of that was really set up well yet, and the other to do with a the premise that all time stamps would be available (which I relaxed). it's still not superbly robust mind you, and I'm waiting to find time to tidy it up a bit and implement these tools as a nightly backup strategy myself ... ;-).

cweijden commented 3 years ago

Apologies. I could have been more clear on this indeed. You can close this issue. I haven't taken time to look into the actual cause, but to give some insight into my terminal interaction:

Starting with your Jan 15 commit on a Python 3.8.5 setup the result was as follows:

$ python3 degoo_login
Successfuly logged in.
$ python3 degoo_ll
degoo_ll: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
          for help use --help
$

This morning (~10:00 CET) I installed Python 3.9 and with it the packages recommended in your requirements.txt of today, with the same result using Python 3.9:

$ python3.9 degoo_login
Successfuly logged in.
$ python3.9 degoo_ll
degoo_ll: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
          for help use --help
$

Then I pulled your latest commit, removed/rebuild the commands and... issue gone on both Python 3.8.5 & 3.9:

$ git pull
remote: Enumerating objects: 31, done.
remote: Counting objects: 100% (27/27), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 21 (delta 11), reused 12 (delta 4), pack-reused 0
Unpacking objects: 100% (21/21), 3.16 KiB | 59.00 KiB/s, done.
From https://github.com/bernd-wechner/Degoo
   3246dc8..892c9bf  master     -> origin/master
Updating 3246dc8..892c9bf
Fast-forward
 build.py          |  2 +-
 commands.py       |  2 +-
 degoo/__init__.py | 41 ++++++++++++++++++++++++++++++-----------
 requirements.txt  | 13 +++++++++++++
 4 files changed, 45 insertions(+), 13 deletions(-)
 create mode 100644 requirements.txt
$ rm degoo_*
$ ls
LICENSE.md  commands.py                   default_properties_superset.txt
README.md   default_properties.txt        degoo
build.py    default_properties_paths.txt  requirements.txt
$ python3.9 build.py
$ python3.9 degoo_login
Successfully logged in.
$ python3.9 degoo_ls
Desktop
Samsung
Web
$ python3 degoo_ls
Desktop
Samsung
Web
$

It may have been the fix for issue 7, or it may have been (a combination of) some other change(s), but it working as expected now. Does this help?

bernd-wechner commented 3 years ago

Thanks heaps! Will close it. Looks like that message trickles up in a caught exception somewhere. But the erro is gone with the recent patches.

Hope the tools help you. They're far from complete, just past the first major milestone of having reverse engineered enough to implement a few basic commands. That took me so much time and effort I took a break afterwards. Better said turned to other urgent projects.