Im getting error in this line "mne.externals.pymatreader import read_mat" and the error is - No module named 'mne.externals' - mne-python

Im getting error in this line "mne.externals.pymatreader import read_mat" , and the error is - No module named 'mne.externals'
I want to know how to remove this error

Related

How to import jregex library to ballerina app

I’m trying to validate regex in Ballerina using library samjs/jregex from https://central.ballerina.io/samjs/jregex
I’m trying to get this executed:
import ballerina/io;
import samjs/jregex;
public function main() {
//io:println(Commons:isValidDateTime("dupa"));
jregex:Pattern p = jregex:compile(regex = ".r");
jregex:Matcher m = p.matcher(input = "br");
var b = m.matches();
io:println(b);
}
I have run command ballerina pull samjs/jregex
My Ballerina.toml is:
[project]
org-name= "organization"
version= "0.1.0"
[platform]
target= "java8"
[[platform.libraries]]
artifactId = "mssql-jdbc"
version = "8.2.0"
path = "./mssql-jdbc-8.2.0.jre8.jar"
[dependencies]
However this is not working, because I’m getting error:
error: module not found: ballerinax/java:*_java8 or ballerinax/java:*_anyerror: samjs/jregex:0.2.0::/src/jregex/matcher.bal:1:1: cannot resolve module 'ballerinax/java'
error: module not found: ballerinax/java:*_java8 or ballerinax/java:*_any
error: samjs/jregex:0.2.0::/src/jregex/pattern.bal:1:1: cannot resolve module 'ballerinax/java'
error: samjs/jregex:0.2.0::/src/jregex/matcher.bal:85:29: undefined module 'java'
error: samjs/jregex:0.2.0::/src/jregex/matcher.bal:85:29: undefined function 'fromString'
error: samjs/jregex:0.2.0::/src/jregex/matcher.bal:128:69: undefined module 'java'
error: samjs/jregex:0.2.0::/src/jregex/matcher.bal:128:69: undefined annotation 'Method'
it seems that import of jregex requires ballerinax, however I cannot import to code anything that is not directly used (Ballerina does not allow for "empty" imports).
Does anybody knows how to import this regex library to make it working in application?

No type named 'Error' in module 'Foundation'

I have created a class named Error. Now, there's also the class Error in Foundation and I still need to be able to access that one.
What I usually do in this case is apply proper namespacing:
Foundation.Error
However, I am getting the following error message:
No type named 'Error' in module 'Foundation'
I've checked the documentation to verify that Error is actually from Foundation:
What am I doing wrong?
The Error protocol
is defined in the Swift Standard Library. You don't even need to import
Foundation in order to use it:
$ swift
Welcome to Apple Swift version 4.2 (swiftlang-1000.11.37.1 clang-1000.11.45.1). Type :help for assistance.
1> var e: Error?
e: Error? = nil
2>
The fully qualified name is therefore Swift.Error.
The (useful) localizedDescription property however is defined in the Foundation
framework, as a protocol extension method.

What is the purpose of foundation.dart in Writing and Reading Files using path_provider plugin?

I am trying to understand how to read and write data on text files using path_provider plugin.
I've read an example on how to use it on Flutter from here. Then I saw this line of code which I don't understand:
import "package:flutter/foundation.dart";
I tried to comment it out from the code and ran "flutter run":
//import "package:flutter/foundation.dart";
And to my surprise, it ran perfectly. Although it raised some errors like:
E/DartVM (23127): 'dart:core/runtime/libintegers.dart': error: Unexpected tag 0 (Nothing) in ?, expected expression
E/DartVM (23127): ../../third_party/dart/runtime/vm/compiler/intrinsifier.cc: 153: error: Intrinsifier failed to find method ~ in class _Smi
and
E/DartVM (23237): 'dart:typed_data': error: Unexpected tag 15 (DirectPropertyGet) in ?, expected type
E/DartVM (23237): ../../third_party/dart/runtime/vm/compiler/intrinsifier.cc: 153: error: Intrinsifier failed to find method get:x in class _Float32x4
But it ran well. I don't know why. When should I use it? What method from the code did the foundation.dart was used?
I would appreciate any kind of enlightment. Thanks in advance.
[UPDATE]
I think I understand why foundation library was used in the example code. Maybe because the example code used the "required" constant from the foundation library.

MissingMethodException is a service: "No signature of method"

Having a really strange issue in a Grails service. I have a service thats setup like this:
package com.mydomain
import java.net.URLEncoder
import java.rmi.server.UID
import java.security.*
class EmailConfirmationService {
def sendConfirmation(Person person) {}
}
And I'm calling it from a controller with emailConfirmationService.sendConfirmation(person)
When I startup the Grails app, it throws the following error:
MissingMethodException occurred when processing request: [POST] /api/people/
No signature of method: mydomain.api.EmailConfirmationService.sendConfirmation() is applicable for argument types: (com.mydomain.Person) values: [name#mydomain.com]
All I have to do is save the EmailConfirmationService file, the watcher picks it up and recompiles, then it works great and never again throws that error.
Until I restart, then it errors until I save that file again.
I've tried the following but nothing has worked yet:
clean build
changed function name
made sure person instance existed
Any ideas?
Your service states another package (com.mydomain) than the one in the error message (mydomain.api). Please make sure, that the packages match and that the file is located in grails-app/services/com/mydomain/EmailConfirmationService.groovy (unless all of this is due to some obfuscation you did for SO)

how to solve the following error in symfony

I created a new module and database in an existing symfony website. My database name is planbook. The following error came up. Please anybody help me.
[23-Mar-2012 01:34:01] Couldn't find class planbook
[23-Mar-2012 01:34:01] PHP Fatal error: Call to a member function evictAll() on a non-object in /home/whatplan/public_html/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php on line 1239
[23-Mar-2012 01:35:50] Couldn't find class Planbook
[23-Mar-2012 01:35:50] PHP Fatal error: Call to a member function evictAll() on a non-object in /home/whatplan/public_html/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php on line 1239
Have you tried symfony cc?

Resources