
23 Cal.App.2d 19 (1937)
THE PEOPLE, Respondent,
v.
ERNEST KRETCHMAR, Appellant.
Crim. No. 1575. 
California Court of Appeals. Third Appellate District.  
October 1, 1937.
 Richard H. Fuidge for Appellant.
 U.S. Webb, Attorney-General, and Wilmer W. Morse, Deputy Attorney-General, for Respondent.
 Thompson, J.
 The defendant has appealed from an order denying his oral motion for a writ of coram nobis to set aside a judgment sentencing him to state prison, which was rendered a year and eight months previously, following his plea of guilty to a charge of burglary. It is contended the defendant pleaded guilty to the charge in ignorance of the fact that it is a necessary element of the crime of burglary that the building be entered with the intent to commit larceny, or some other felony. On the contrary, he contends that he entered the building in question with the consent of the owner. He therefore asked that the judgment be set aside and that he be permitted to change his plea to that of not guilty and receive a trial by jury. The motion was heard on the affidavit of the defendant and upon the evidence adduced at the preliminary hearing of the case. Oral notice of appeal from the order denying his motion for a writ of coram nobis was announced in open court at the time the order was made. *21
 [1] The defendant also attempted to appeal from an order of the same court previously made on June 24, 1937, denying his application under section 1567 of the Penal Code to be transferred from the state prison where he is serving sentence to enable him to appear as a witness and testify at the hearing of his petition for a writ of coram nobis. No notice of appeal from that order was given at the time in open court as required by section 1239 of the Penal Code. The purported notice of appeal which was given a week later is ineffectual. (People v. Lanham, 21 Cal.App.2d 410 [69 PaCal.2d 426]; People v. Moore, 18 Cal.App.2d 224 [63 PaCal.2d 835].) The code prescribes the only method of perfecting an appeal from an order which is made in a criminal case after judgment is pronounced. The code says in that regard:
 "An appeal ... may be taken by the defendant ... from any order made after judgment, by announcing in open court at the time the same is made that he appeals from the same."
 The defendant failed to conform to this statutory requirement.
 [2] Moreover, it does not appear that the defendant was prejudiced by the denial of his request to personally appear as a witness at the hearing. A very complete statement of the facts relied upon was included in the affidavit of the defendant which was presented at the hearing. It does not appear he could have testified to further material facts which are not included in his affidavit. The denial of the motion was therefore harmless.
 The appeal from the order refusing to permit the defendant to be transferred from state prison to become a witness at the coram nobis hearing was ineffectual for lack of statutory notice, and it is therefore dismissed.
 [3] Assuming, without so deciding, that an oral motion for a writ of coram nobis may be lawfully presented without filing a petition therefor, we are of the opinion the writ was properly denied for the reason that the error of which the defendant complains is really one of law and not merely a mistake of fact. The proceedings indicate that the defendant pleaded guilty to the charge of burglary because he did not realize the law requires, as a necessary element of that offense, that the accused person shall enter the building "with intent *22 to commit grand or petit larceny or any felony". (Sec. 459, Pen. Code.) He now contends that he entered the building in company with another person with the consent of the owner to procure his own belongings, and that, while they were in the building, his associate, Edgar Andrews, without his knowledge or consent, stole two revolvers belonging to the owner of the building. He said he was led to believe that under such circumstances he would be guilty of burglary even though he entered the building for a lawful purpose and without knowledge of his associate's intent to commit larceny, or that he had stolen property while they were in the building. This merely means that he was mistaken as to what the law requires with respect to the necessary elements of the crime of burglary. That amounts to a mistake of law and not one of fact. The writ of coram nobis lies only to correct errors of fact. It may not be resorted to for the purpose of correcting errors of law. (2 R. C. L. 307, sec. 262; 15 R. C. L. 714, sec. 166; 3 Am. Jur. 766, sec. 1276; 26 Standard Ency. of Proc., 601, II, 3; People v. Moore, 9 Cal.App.2d 251 [49 PaCal.2d 615]; People v. Lumbley, 9 Cal.2d 752 [68 PaCal.2d 358].) In 2 Ruling Case Law, page 306, section 261, it is said that the writ of coram nobis "is not allowed as of course, but only on its being made to appear with reasonable certainty that there has been some error of fact".
 [4] The court was warranted in concluding that the defendant was not misled regarding the pretended facts of the case. The defendant knew that he was charged with inducing his associate, Andrews, to go with him to the cabin of a miner by the name of Massa, near Camptonville, to steal his revolvers, and that they did enter the cabin together for that purpose at about 8 o'clock P. M. on August 28, 1936, at which time the defendant took the revolvers and subsequently gave one of them to Andrews in payment of a debt which he owed to him. At the preliminary examination of the defendant and Andrews on the charge of robbery, the transcript of which was received in evidence without objection on this coram nobis proceeding, C. C. McCoy, the sheriff of Yuba County, testified in that regard:
 "I investigated ... at Mariposa and found that he (Kretchmar) had sold a gun down there for $15.00. ... Andrews was picked up over in Downieville. ... When the *23 sheriff arrested him he found Massa's [other] gun. ... He told me he had met Kretchmar at Grass Valley and on the day of this burglary Kretchmar had talked the matter over with him in regard to Massa's guns and that he could get them without any trouble. ... So they went over there that night to Massa's residence, Kretchmar reached under the steps and got the key and they went into the house and they carried out some foodstuffs and these guns were taken out. ... Kretchmar said that he owed him (Andrews) some money and he gave him a gun for this debt."
 Mr. McCoy further testified that he later talked to Kretchmar about the burglary, and he said "he didn't remember it, but if Andrews said it was so, it must be so". The sheriff further testified that "Kretchmar admitted that after they left Massa's place they went over to Jake's place and while there they did considerable drinking and that the long gun was at the head of Jake's bed and they picked the gun up and took it with them". This colloquy then occurred in the presence of Kretchmar during the preliminary hearing:
 "By Defendant Andrews: It wasn't admitted that I helped take the gun."
 "By Mr. McCoy: No, you at no time admitted that you carried the guns out of the house, but you told me ... the matter was talked over between you two about coming over here to get these guns. Is that correct?"
 "By Defendant Andrews: Yes, but there is a little more to it, Sheriff. I tried to persuade him not to go."
 "Mr. McCoy: Yes, that's right."
 At the conclusion of the evidence adduced at the preliminary hearing, the defendant Kretchmar was instructed by the magistrate of his rights and was then asked if he wished to make any statement or ask questions of the witness. He replied, "No, I think not."
 From the preceding evidence it appears clear that Kretchmar knew his associate, Andrews, deliberately accused him of planning to enter the Massa cabin with the purpose and intent of stealing the revolvers. He did not contradict the statements made by Andrews or McCoy at the preliminary hearing. No suggestion was then made that he entered the cabin with the consent of its owner to get his own property. Evidently that was an afterthought. It comes too late to assert with probity. The court was justified in denying the writ. *24
 [5] It is true that at a separate trial of Andrews which occurred before the same trial judge, a jury acquitted him of the charge of burglary. It is suggested that verdict is inconsistent with Kretchmar's plea of guilty. The verdict acquitting Andrews furnishes no light regarding the guilt of this defendant. In truth it is in accordance with the statement of Andrews made to Sheriff McCoy and again confirmed at the preliminary hearing, to the effect that Kretchmar planned the burglary and entered the cabin with the intention of stealing the revolvers, to which Andrews protested. We must assume the jury believed Andrews did not enter the building with the intent to commit larceny.
 [6] It is further suggested in support of the motion for a writ of error coram nobis that prior to the time when this defendant entered his plea of guilty, the district attorney, W. C. Rucker, who subsequently died, said to this defendant:
 "If you use your head and do not create a disturbance, or put the county to the expense of a jury trial, possibly the court may go lighter on you and you may get only a jail sentence or perhaps probation. You cannot expect to get in the clear absolutely on this matter, because you took Andrews out there and if you had not taken him the guns would not have been gone; you are really as much to blame as he is because you are an accomplice."
 Regarding this statement of the district attorney, the affidavit in support of the motion for a writ of coram nobis concedes that affiant was not deceived thereby. It reads:
 "Affiant states the fact to be that the district attorney never at any time, or in any way, actually or in terms or by implication promised or indicated to affiant that this would be the result of his pleading guilty, or that he would be in any position to, or would attempt to influence the court in its proceeding but affiant gathered the impression that if he followed the suggestion of the district attorney, he would appear in a much more favorable light in the eyes of the court and that it would be but a matter of a short while before he would be freed."
 It is apparent from the preceding statement of the affiant that he was not misled or deceived by the statement of the district attorney. He merely concluded that a plea of guilty would place him in a more favorable light with the court, and that his confession of guilt might result in a shorter term of *25 imprisonment. In other words, he speculated on the result of pleading guilty. That statement of the district attorney did not constitute fraud which deprived the defendant of a trial. In the case of People v. Forbes, 219 Cal. 363 [26 PaCal.2d 466], it was held that an application for a writ of coram nobis was properly refused where the petitioner failed to show that he was induced to plead guilty to a charge of murder by fraud or improper influence. In the case of People v. Lumbley, supra, in holding that the application for a writ of coram nobis was properly refused, the court quoted with approval from the case of People v. Moore, supra, as follows:
 "We fail to see how the position of the defendant in this proceeding is any different from that of a person who pleads guilty to a crime believing in fact that he was guilty of the same at the time of his plea, when, as a matter of law, the facts could not establish his guilt. In the latter situation the defendant would have the undoubted right to make a motion to change his plea."
 The preceding language is peculiarly applicable to the situation in the present proceeding.
 We are of the opinion the court properly denied the motion for a writ of coram nobis.
 The order is affirmed.
 Pullen, P. J., and Plummer, J., concurred.
