retrocomputacion / retrobbs

A multimedia BBS software written in Python for Turbo56K enabled terminals running on Commodore 64 computers
GNU General Public License v3.0
37 stars 4 forks source link

Add user to dbmaintenance.py causes an error #5

Closed chriskewl closed 1 year ago

chriskewl commented 1 year ago

This is done on a Raspberry Pi 4 in CLI:

admin@c64pi:~/retrobbs $ sudo python3 dbmaintenance.py
----RetroBBS Database maintenance tool----

Database open...
Checking database integrity...
User entries: 0
Total messages: 0
---------------------
Please select action:
---------------------
3: Add user
0: Quit

Your selection:3
User Name:chriskewl
Password (6 to 16 chars):******
First name (enter skip):chris
Last name (enter skip):h
Birthday DD/MM/YYYY (warning, no sanity check performed):01/01/1978
Country (enter skip):usa
New class 1-10 (enter 1):10
Traceback (most recent call last):
  File "/home/admin/retrobbs/dbmaintenance.py", line 310, in <module>
    data.newUser(uname,pw,fname,lname,bday,country,uclass)
TypeError: newUser() takes 7 positional arguments but 8 were given

(I removed my password from the screen above and replaced with stars.)

retrocomputacion commented 1 year ago

Fixed in latest commit, please test

chriskewl commented 1 year ago

Still getting the same bug on the newest version, even copied it from GitHub and got the same response.

admin@c64pi:~/retrobbs $ sudo python3 dbmaintenance.py
----RetroBBS Database maintenance tool----

Database open...
Checking database integrity...
User entries: 0
Total messages: 0
---------------------
Please select action:
---------------------
3: Add user
0: Quit

Your selection:3
User Name:ChrisKewl
Password (6 to 16 chars):abc123
First name (enter skip):Chris
Last name (enter skip):H
Birthday DD/MM/YYYY (warning, no sanity check performed):01/01/1978
Country (enter skip):US
New class 1-10 (enter 1):10
Traceback (most recent call last):
  File "/home/admin/retrobbs/dbmaintenance.py", line 309, in <module>
    data.newUser(uname,pw,fname,lname,bday,country,uclass)
TypeError: newUser() takes 7 positional arguments but 8 were given
retrocomputacion commented 1 year ago

Seems you only downloaded the new dbmaintenance.py, you also need to download common/dbase.py

chriskewl commented 1 year ago

You are correct, I updated both and it now works.

Suggestion: When doing an "Update user" or "Delete user" - if sysop just presses Return for "User Name:" have the program go back to the menu, no need to ask again. This way you can get out of that User Name loop.

Thanks!

retrocomputacion commented 1 year ago

Thanks! Yeah, dbmaintenance is really primitive. Gotta add what you suggested and other missing options.