I am building a simple kivy app to display datatables and this part of the code raises an error. Are there any fixes? - kivy

Building a basic app the shows tables. But this simple code isn't working for me.
self.data_table = MDDataTable(column_data=[("col2",dp(30)),("col2",dp(30))],row_data=[("row 1.1", "row 1.2")])
self.add_widget(self.data_table)
It keeps showing me the following error:
BuilderException: Parser: File "<inline>", line 20:
18: radius: [self.border_radius]
19: source: root.background
20: md_bg_color: self.theme_cls.bg_light
AttributeError: 'str' object has no attribute 'bg_light'
Any idea on why this is happening?

Related

Getting errors with session variable in partialview MVC

Someone please help out: I added this statement to my partialview login page
#HttpContext.Current.Session["userID"] = User.Identity.GetUserId().ToString();
and receive errors below:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1525: Invalid expression term '='
Source Error:
Line 66: #line default
Line 67: #line hidden
Line 68: EndContext("~/Views/Shared/_LoginPartial.cshtml", 73, 37, false);
Line 69:
Line 70:
As you try to perform assignments in Razor, it requires to wrap the code in curly brackers
#{ HttpContext.Current.Session["userID"] = User.Identity.GetUserId().ToString(); }
I just use User.Identity.GetUserId directly instead of session variable.
Thank you all.
Still, I appreciate it if someone can explain what that error means though.

Xcode 5 Documentation Error

I wanted to describe my code like this
/** Loads and parses the XML file*/
+(NSMutableArray *)loadXML:(NSString *)table;
But when I try to use the quick help for loadXML: Xcode crashes with this Error:
ASSERTION FAILURE in /SourceCache/IDEPlugins/IDEPlugins-5064/IDEQuickHelp/Models/IDEQuickHelpContentCreator.m:321
Details: Error creating XML document from clang-parsed comment block: Error Domain=NSXMLParserErrorDomain Code=73 "Line 1: invalid character in attribute value
Line 1: attributes construct error
Line 1: Couldn't find end of Start Tag Function
" UserInfo=0x7fc78fb98500 {NSLocalizedDescription=Line 1: invalid character in attribute value
Line 1: attributes construct error
Line 1: Couldn't find end of Start Tag Function
}
Could anyone help me please?
Sorry for my bad english
Delete the "LaunchScreen.xib" from your project and you are done.
Sounds like it's time to submit a bug report to Apple's bug reporter.
If you restart your computer and re-launch Xcode, does the crash occur again?

Rails Ruby - Handeling Nil in production vs development

I launched my site with phusion passenger on a server and everything seems to run smoothly exept one page.
Here I get the following error message:
NoMethodError in Identities#show
Showing /var/www/feedme/app/views/identities/_platemenu.html.erb where line #13 raised:
undefined method `collect' for nil:NilClass
10: <div id="plate_heading_box">
11: <p class="plates_head">
12:
13: <%#params=#myp.collect{|i| i.to_i}%>
14: <%#allsecondary=#plates.collect(&:id)%>
15:
16: <%if #startup != 1%>
It seems like the instance variable #myp doesn't work in production, because it works perfectly fine when I test it on my own computer in development. The variable is first declared in my controller:
if params[:plates]!=nil
#myp = params[:plates]
else
#myp = Array.new
end
Not really sure why it doesn't work, any clues?
Thanks in advance!
EDIT:
If I move the controller code out to the view it works... I wish the site would read the controller first ....
I suspect the problem is actually on line 14, where you call collect on #plates, which doesn't appear to be initialized anywhere.

Sublime Test 2 RubyTest not showing any results

I am following the Ruby on Rails Tutorial. When testing RubyTest (CMD+Shift+R; CMD+Shift+T; CMD+Shift+E) in Sublime Text 2, nothing shows up. The window opens below my files where the tests should be, and it says "Building", but then the "Building" disappears and nothing is left. No test, no green, red, nothing.
I have added RubyTest as described, as well as opened from Command Line as outlined. Need more help troubleshooting.
Using OSX Lion, Ruby 1.9.3, Rails 3.2.10. My Guard and Spork testing are fine. My RubyTest settings are as per RubyTest.sublime-settings
Any thoughts or places to start? I'm pretty new to this, but damn stubborn so I would like to solve as oppose to just "move on". Thanks in advance.
I think I might have the right solution for you, as I've just run into the same problem and solved it.
First, find out what's causing the "Building..." error with RubyTest by digging into the Sublime Text 2 console (View > Show Console).
This was my console output:
Running rspec spec/requests/static_pages_spec.rb -l15
Traceback (most recent call last):
File "./sublime_plugin.py", line 337, in run_
File "./exec.py", line 154, in run
File "./exec.py", line 45, in __init__
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 72: ordinal not in range(128)
reloading /Users/Jonathan/Library/Application Support/Sublime Text 2/Packages/User/RubyTest.last-run
Taken from here, it turns out ST2 tries to evaluate all shell expressions.
From the same link, here's how I fixed it: go to Library > Application Support > Sublime Text 2 > Packages > Default and edit exec.py starting at the for loop at line 45:
for k, v in proc_env.iteritems():
path_vars = os.path.expandvars(v)
if isinstance(path_vars, unicode):
path_vars = path_vars.encode(sys.getfilesystemencoding())
proc_env[k] = path_vars
Hope this solved your problem!

sIFR 3 r4.36 has problem with Flash 8

I cannot export any font with Flash 8 using sIFR 3 r4.36. Flash 8 always shows the following error message. Any idea why?
** Error ** Scene=Scene 1, layer=code, frame=1:Line 19: The class or interface 'sIFR' could not be loaded.
import Options
Total ActionScript Errors: 1 Reported Errors: 1
Make sure the sifr.fla file and the ActionScript files are in the same directory.

Resources