Comments (7)
@rvojcik , can you imagine where this is coming from? I started over with your last commit and the error is the same.
from rt-server-client.
I'm having this same issue, but at Installation Date:
Traceback (most recent call last):
File "./system-info.py", line 500, in
result = rtobject.GetAttributeValue(object_id, rtobject.GetAttributeId("Installation Date"))
File "./lib/rtapi/init.py", line 259, in GetAttributeValue
sql = "SELECT string_value,uint_value,float_value FROM AttributeValue WHERE object_id = %d AND attr_id = %d" % (object_id, attr_id)
TypeError: %d format: a number is required, not NoneType
from rt-server-client.
Hi guys, I have to create some installation script. I merge code from our production to opensource and sometimes there is fields I use in production but you dont have them in racktables.
There is 2 possible solutions.
- Comment out the lines where inserting missing attribute
- Create attribute in racktables and assign it to server. For these errors you have to create new Server attribute "Installation Date" and "CPU Model" in racktables cofiguration menu
I hope this helps. In new release a create installation script which checks all missing attributes.
from rt-server-client.
Configuration -> Attributes -> (Edit Attributes | Edit Map)
from rt-server-client.
Hello @rvojcik and thank you for helping out. I added these two attributes in the racktables and now I receive this error instead.
/opt/rt-server-client# ./system-info.py
Traceback (most recent call last):
File "./system-info.py", line 399, in <module>
rtobject.InsertAttribute(object_id,server_type_id,rtobject.GetAttributeId("CPU Model"),cpu_model_name,"NULL",hostname)
File "./lib/rtapi/__init__.py", line 242, in InsertAttribute
self.db_insert(sql)
File "./lib/rtapi/__init__.py", line 67, in db_insert
self.dbresult.execute(sql)
File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.IntegrityError: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`racktables_db`.`AttributeValue`, CONSTRAINT `AttributeValue-FK-map` FOREIGN KEY (`object_tid`, `attr_id`) REFERENCES `AttributeMap` (`objtype_id`, `attr_id`))')
from rt-server-client.
Perfect, you need add all these attributes
- "CPU Model"
- "CPUs Logical"
- "CPUs"
- "Cores per CPU"
- "CPU, MHz"
- "RAM Mem, MB"
- "Installation Date"
- "Kernel"
from rt-server-client.
I added those attributes as you advised as well, the error is the same, though.
from rt-server-client.
Related Issues (17)
- lsb-release not avaible on freebsd HOT 4
- Missing attributes in database
- ToolBox is missing HOT 1
- base missing in /rt-server-client/lib/Toolbox HOT 2
- NameError: name 'init_run' is not defined HOT 1
- /opt/server-audit/get-bios-ident.py missing HOT 4
- Hostname <> already exist. I'm using service tag: ERROR: Problem during executing dmidecode HOT 1
- DB Insertion Fails Foreign Key Constraint HOT 8
- Support for Python3 HOT 1
- I get SyntaxError: invalid syntax HOT 4
- Redisign to use python-pip HOT 1
- Refactoring the code HOT 1
- Usage with VM HOT 1
- Virtualization: KVM Support HOT 1
- Code optimalization, debug HOT 1
- Script does not update the SW Type for Ubuntu systems HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rt-server-client.