I started to using mothur version - v.1.36.1-, but I got some error messages (shown below). How I can overcome this? - mothur

I start the Mothur Tutorial (https://www.mothur.org/wiki/MiSeq_SOP). But from the beginning, I got some error messages when I create " make.file "in mothur*(Error commands are shown below). I changed parameters but the result was negative. How can I solve this problem?
****mothur > make.file(inputdir=MiSeq_SOP, type=fastq, prefix=stability)
Setting input directory to: MiSeq_SOP/
prefix is not a valid parameter.
The valid parameters are: type, seed, inputdir, and outputdir.
[ERROR]: did not complete make.file.****

Actually, the prefix parameter is a valid parameter in mothur. Personally, I have never encountered a problem with using a prefix for the make.file command, but your command should be valid.
You could test if your inputdir is specified correctly (the mothur error and warning messages are not necessarily the most clear ones). If this works as well, I suggest that you well document this behaviour and send it to the mothur team (in my experience, they are quite responsive and ready to help).

Related

Error on one page that does not appear anywhere else

Hi so my wordpress site has just started acting up, I am not sure if its an update that has caused this but only on this one page I am getting this error regarding
Notice: Array to string conversion in /customers/c/1/7/veganantics.co.uk/httpd.www/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Schemas/ImageAttachmentSchema.php on line 95
I can't seem to find the issue, I have tried replacing the file with a new core file and the error is still there, would really appreciate some help
This is the page: https://veganantics.co.uk/vegan-gifts/
Thank you
Ash
The theme, a plugin or some custom code is probably using the wp_calculate_image_sizes filter and returning an array instead of a string.
Do a text search on your install and look for wp_calculate_image_sizes. The function that you need to find will look similar to
add_filter('wp_calculate_image_sizes', 'something');
Explanation:
ImageAttachmentSchema.php on line 95 is calling wp_get_attachment_image_sizes which must be a string.
wp_get_attachment_image_sizes is returning wp_calculate_image_sizes( $size_array, $image_src, $image_meta, $attachment_id ) which again must be a string.
wp_calculate_image_sizes returns a filtered value, and that's the only place where such an error (array instead of a string) can happen. So, if the filter incorrectly returns an array, it bubbles up to the function that you see in the error log.

Is socket's "leave" automatically converted to "left" for the receiver?

In my code, I use WebRTC, AngularJS and rtpConnection.
One declare is:
https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.2.0/socket.io.js
In my code, I react to the following event:
socket.on("left", somevar)
However, I don't see where this is emitted, I searched just anywhere in my code.
But I just don't find any .emit("left" or ".emit('left' in my code.
The only code that is SOMEWHAT related is
socket.emit('leave', somevar);
But I just don't understand it: "leave" is not "left".
The only possible explanation would be that "leave" is internally converted to "left" for the receiver.
Is that actutally the case?
If not, where else could I find this emitting code?
No, socket doesn't do this automatically.
It's stated in the code somewhere by you.

Python behave Gherkin Step parameter getting compile time Number expected exception

Feature: Step Parameter Test
Scenario: look up a book
Given I search for a valid book
Then the result page will include "success"
Scenario: look up an invalid book
Given I search for a invalid book
Then the result page will include "failure"
Step Definition: getting exception Number expected between {}, Not considering status as parameter
#then('the result page will include {status}')
def step_impl(context,status):
"""
:type context: behave.runner.Context
"""
pass
Exception Screenshot:
I have tried even regular expression in that case getting steps undefined exception. didn't find any way to pass the string/number/double as parameter from feature file
Please do suggest if there is way to solve this.
It seems that, for whatever reason, your behave parser is 're'. when typically it's 'parse'.
In your test file add the following:
from behave import use_step_matcher
use_step_matcher('parse')
#the rest of your test here
##given...
behave documentation on use_step_matcher here.

Why is the windows return code called HRESULT?

The standard return type for functions in Windows C/C++ APIs is called HRESULT.
What does the H mean?
Result handle as stated here at MSDN Error Handling in COM
The documentation only says:
The return value of COM functions and methods is an HRESULT, which is not a handle to an object, but is a 32-bit value with several fields encoded in a single 32-bit ULONG variable.
Which seems to indicate that it stands for "handle", but is misused in this case.
Hex Result.
HRESULT are listed in the form of 0x80070005. They are a number that gets returned by COM\OLE calls to indicate various types of SUCCESS or FAILURE. The code itself is comprised of a bit field structure for those that want to delve into the details.
Details of the bit field structure can be found here at Microsoft Dev Center's topic Structure of COM Error Codes and here at MSDN HRESULT Structure.
The H-prefix in Windows data types generally designates handle types1 (such as HBRUSH or HWND). The documentation seems to be in agreement, sort of:
The HRESULT (for result handle) is a way of returning success, warning, and error values. HRESULTs are really not handles to anything; they are only values with several fields encoded in the value.
In other words: Result handles are really not handles to anything. Clearly, things cannot possibly have been designed to be this confusing. There must be something else going on here.
Luckily, historian Raymond Chen is incessantly conserving this kind of knowledge. In the entry aptly titled Why does HRESULT begin with H when it’s not a handle to anything? he writes:
As I understand it, in the old days it really was a handle to an object that contained rich error information. For example, if the error was a cascade error, it had a link to the previous error. From the result handle, you could extract the full history of the error, from its origination, through all the functions that propagated or transformed it, until it finally reached you.
The document concludes with the following:
The COM team decided that the cost/benefit simply wasn’t worth it, so the HRESULT turned into a simple number. But the name stuck.
In summary: HRESULT values used to be handle types, but aren't handle types any more. The entire information is now encoded in the value itself.
Bonus reading:
Handle types losing their reference semantics over time is not without precedent. What is the difference between HINSTANCE and HMODULE? covers another prominent example.
1 Handle types store values where the actual value isn't meaningful by itself; it serves as a reference to other data that's private to the implementation.

error in declaring higher-order functions in XPath 3.0: must declare return type?

Following #DimitreNovatchev's article Programming in XPath 3.0, and using BaseX GUI as the test environment, I tried some of the examples that define functions that accept functions as parameters. E.g. with
let $compose :=
function($f as function(), $g as function())
(The rest of the code isn't relevant to this error, but you can see it as the third example under Function Composition.)
I get this error from BaseX:
Error:
Stopped at 43-compose.xpath, 2/39:
[XPST0003] Expecting 'as', found ','.
The point where the error was detected was on the second line, just before the comma. Apparently, the processor expects the $f parameter declaration to say not just that $f should be a function, but also the return value of the function.
I don't know whether it's right for BaseX to expect that or not. Presumably, Dimitre's examples tested successfully before he made that presentation at Balisage. Maybe something changed in the XPath 3.0 spec between that article and when BaseX was released?
OK, found the answer. I got an evaluation key for Saxon EE, so I was able to try another processor. For future reference, this was the command line:
C:\Program Files\Saxon>java -cp saxon9ee.jar net.sf.saxon.Query -s:"input.xml" -
q:"ex5.xpath" -qversion:3.0
Note that -qversion:3.0 is currently required in order to get any 3.0 functionality.
Saxon throws an error at the same point, but gives a helpful suggestion on how to fix it:
Error on line 2 column 39 of ex5.xpath:
XPST0003 XQuery syntax error near #... function($f as function(), $#:
function() is no longer allowed for a general function type: must be function(*)
I changed function() to function(*) wherever a general function type was wanted, and the errors went away, both in BaseX and in Saxon.
So apparently BaseX was correct (but Saxon's error message was more helpful, as is often the case!). Sounds like something did change in the spec recently. I haven't been able to figure out what the relevant change was, from the change log. But regardless of what changed, the spec currently says that a FunctionTest must have either a * within the parentheses, or an as after them. (This applies to declarations of parameters that are functions, but does not apply to inline functions themselves.)

Resources